Private
Public Access
primeros cambios hechos para tener el multitenant
This commit is contained in:
1 parent
34ad4424f9
commit
4e082e8767
132 files changed
+6202
-762
No files matched your search
@@ -7,15 +7,17 @@ import (
|
||||
)
|
||||
|
||||
type Usuario struct {
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
Email string `gorm:"uniqueIndex;not null;type:varchar(100)" json:"email"`
|
||||
Password string `gorm:"not null" json:"-"`
|
||||
Name string `gorm:"not null" json:"name"`
|
||||
Grupos []Grupo `gorm:"many2many:usuarios_grupos;" json:"grupos,omitempty"`
|
||||
// Empresas []Empresa `gorm:"many2many:user_empresa;" json:"empresas,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
Email string `gorm:"uniqueIndex;not null;type:varchar(100)" json:"email"`
|
||||
Password string `gorm:"not null" json:"-"`
|
||||
Name string `gorm:"not null" json:"name"`
|
||||
Activo bool `gorm:"not null;default:true" json:"activo"`
|
||||
DebeCambiarPassword bool `gorm:"not null;default:false" json:"-"`
|
||||
Grupos []Grupo `gorm:"many2many:usuarios_grupos;" json:"grupos,omitempty"`
|
||||
Empresas []Empresa `gorm:"many2many:empresa_usuarios;" json:"empresas,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
||||
}
|
||||
|
||||
func (Usuario) TableName() string {
|
||||
|
||||
Reference in new issue
Block a user