Private
Public Access
listoooooooooo
Signed-off-by: fede <federico.nicolas.polidoro@gmail.com>
This commit is contained in:
1 parent
ff21aa4264
commit
ce83c494c9
4 files changed
+48
-86
No files matched your search
@@ -62,29 +62,6 @@ func (EmpresaUsuario) TableName() string {
|
||||
return "empresa_usuarios"
|
||||
}
|
||||
|
||||
type RolPlataforma string
|
||||
|
||||
const (
|
||||
RolSuperadmin RolPlataforma = "SUPERADMIN"
|
||||
RolSoporte RolPlataforma = "SOPORTE"
|
||||
)
|
||||
|
||||
// PlataformaAdmin es un rol transversal, separado de los grupos de cada
|
||||
// empresa. No debe usarse para acceder a datos de negocio sin membresía.
|
||||
type PlataformaAdmin struct {
|
||||
UsuarioID uint `gorm:"primaryKey" json:"usuario_id"`
|
||||
Rol RolPlataforma `gorm:"type:varchar(20);not null;default:'SUPERADMIN'" json:"rol"`
|
||||
Activo bool `gorm:"not null;default:true" json:"activo"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
|
||||
Usuario Usuario `gorm:"foreignKey:UsuarioID" json:"usuario,omitempty"`
|
||||
}
|
||||
|
||||
func (PlataformaAdmin) TableName() string {
|
||||
return "plataforma_admins"
|
||||
}
|
||||
|
||||
// InvitacionEmpresa permite sumar un usuario existente o crear uno nuevo en
|
||||
// una empresa sin compartir contraseñas.
|
||||
type InvitacionEmpresa struct {
|
||||
|
||||
Reference in new issue
Block a user