1
This commit is contained in:
40
internal/erpserver/model/system/user.go
Normal file
40
internal/erpserver/model/system/user.go
Normal file
@@ -0,0 +1,40 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type User struct {
|
||||
ID int32 `json:"id" gorm:"primaryKey"`
|
||||
Uuid uuid.UUID `json:"uuid"`
|
||||
// 邮箱地址
|
||||
Email string `json:"email"`
|
||||
// 用户名称
|
||||
Username string `json:"username"`
|
||||
// 加密密码
|
||||
HashedPassword []byte `json:"hashed_password"`
|
||||
// 密码盐值
|
||||
Salt string `json:"salt"`
|
||||
// 头像
|
||||
Avatar string `json:"avatar"`
|
||||
// 性别
|
||||
Gender int32 `json:"gender"`
|
||||
// 部门
|
||||
DepartmentID int32 `json:"department_id"`
|
||||
// 角色
|
||||
RoleID int32 `json:"role_id"`
|
||||
// 状态
|
||||
Status int32 `json:"status"`
|
||||
// 密码修改时间
|
||||
ChangePasswordAt time.Time `json:"change_password_at"`
|
||||
// 创建时间
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
// 更新时间
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
func (User) TableName() string {
|
||||
return "sys_user"
|
||||
}
|
||||
Reference in New Issue
Block a user