refactor🎨: 数据初始化
This commit is contained in:
1 parent
6a31ac916a
commit
54e116818b
15 files changed
+4175
-266
No files matched your search
@@ -6,8 +6,6 @@ import (
|
||||
)
|
||||
|
||||
type SysUser struct {
|
||||
ControlBy
|
||||
ModelTime
|
||||
UserId int `gorm:"primaryKey;autoIncrement;comment:编码" json:"userId"`
|
||||
Username string `json:"username" gorm:"type:varchar(64);comment:用户名"`
|
||||
Password string `json:"-" gorm:"type:varchar(128);comment:密码"`
|
||||
@@ -22,6 +20,8 @@ type SysUser struct {
|
||||
PostId int `json:"postId" gorm:"type:bigint(20);comment:岗位"`
|
||||
Remark string `json:"remark" gorm:"type:varchar(255);comment:备注"`
|
||||
Status string `json:"status" gorm:"type:varchar(4);comment:状态"`
|
||||
ControlBy
|
||||
ModelTime
|
||||
}
|
||||
|
||||
func (SysUser) TableName() string {
|
||||
@@ -45,4 +45,4 @@ func (e *SysUser) Encrypt() (err error) {
|
||||
|
||||
func (e *SysUser) BeforeCreate(_ *gorm.DB) error {
|
||||
return e.Encrypt()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user