add new db handler with table change to reference many2many
This commit is contained in:
@@ -8,9 +8,10 @@ type User struct {
|
||||
Id uint `gorm:"primaryKey" json:"id"`
|
||||
Name string `gorm:"column:user_name" json:"user"`
|
||||
Email string `gorm:"column:email" json:"email"`
|
||||
Role string `gorm:"column:role" json:"role,omitempty"`
|
||||
RoleID *uint `gorm:"column:roleId" json:"roleId,omitempty"`
|
||||
Role *Role `gorm:"foreignKey:RoleID" json:"role,omitempty"`
|
||||
Password string `gorm:"column:password" json:"password"`
|
||||
NewPassword string `gorm:"-" json:"newPassword"`
|
||||
NewPassword string `gorm:"-" json:"newPassword,omitempty"`
|
||||
Expiration string `gorm:"column:expiration" json:"expiration,omitempty"`
|
||||
Settings Settings `gorm:"type:json" json:"settings"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user