Private
Public Access
feat: hecha parte del back para crear clientes y correjida alta de
miembros Signed-off-by: fede <federico.nicolas.polidoro@gmail.com>
This commit is contained in:
1 parent
37f1741a77
commit
405eaca25c
20 files changed
+417
-112
No files matched your search
@@ -46,12 +46,13 @@ func (r RolEmpresa) EsAdministrador() bool {
|
||||
|
||||
// EmpresaUsuario es la membresía de un usuario global dentro de una empresa.
|
||||
type EmpresaUsuario struct {
|
||||
EmpresaID uint `gorm:"primaryKey" json:"empresa_id"`
|
||||
UsuarioID uint `gorm:"primaryKey" json:"usuario_id"`
|
||||
Rol RolEmpresa `gorm:"type:varchar(20);not null;default:'MEMBER'" json:"rol"`
|
||||
Activo bool `gorm:"not null;default:true" json:"activo"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
EmpresaID uint `gorm:"primaryKey" json:"empresa_id"`
|
||||
UsuarioID uint `gorm:"primaryKey" json:"usuario_id"`
|
||||
Rol RolEmpresa `gorm:"type:varchar(20);not null;default:'MEMBER'" json:"rol"`
|
||||
Activo bool `gorm:"not null;default:true" json:"activo"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
||||
|
||||
Empresa Empresa `gorm:"foreignKey:EmpresaID" json:"empresa,omitempty"`
|
||||
Usuario Usuario `gorm:"foreignKey:UsuarioID" json:"usuario,omitempty"`
|
||||
|
||||
Reference in new issue
Block a user