user.go 1.4 KB

12345678910111213141516171819202122232425
  1. package gorm_model
  2. import (
  3. "time"
  4. )
  5. type YounggeeUser struct {
  6. ID int64 `gorm:"column:id;primary_key;AUTO_INCREMENT"` // 用户表id
  7. User string `gorm:"column:user"` // 账号
  8. Username string `gorm:"column:username"` // 后台用户名
  9. Password string `gorm:"column:password"` // 用户密码
  10. RealName string `gorm:"column:real_name"` // 真实姓名
  11. Role string `gorm:"column:role"` // 角色 1,超级管理员; 2,管理员;3,企业用户; 4. 企业子账号;5. 管理后台子账号;6.服务商账号;7.服务商子账号
  12. Phone string `gorm:"column:phone"` // 绑定手机
  13. Email string `gorm:"column:email"` // 电子邮件
  14. LastLoginTime time.Time `gorm:"column:last_login_time"` // 最后一次登录时间
  15. UserState string `gorm:"column:user_state;default:1;NOT NULL"` // 0,禁用,1,正常
  16. CreatedAt time.Time `gorm:"column:created_at"` // 创建时间
  17. UpdatedAt time.Time `gorm:"column:updated_at"` // 更新时间
  18. AuthStatus int `gorm:"column:auth_status"` // 认证状态
  19. }
  20. func (m *YounggeeUser) TableName() string {
  21. return "younggee_user"
  22. }