You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
1.6 KiB

3 years ago
  1. package system
  2. import (
  3. "autocode/global"
  4. "github.com/satori/go.uuid"
  5. )
  6. type SysUser struct {
  7. global.GVA_MODEL
  8. UUID uuid.UUID `json:"uuid" gorm:"comment:用户UUID"` // 用户UUID
  9. Username string `json:"userName" gorm:"comment:用户登录名"` // 用户登录名
  10. Password string `json:"-" gorm:"comment:用户登录密码"` // 用户登录密码
  11. NickName string `json:"nickName" gorm:"default:系统用户;comment:用户昵称"` // 用户昵称
  12. SideMode string `json:"sideMode" gorm:"default:dark;comment:用户侧边主题"` // 用户侧边主题
  13. HeaderImg string `json:"headerImg" gorm:"default:https://qmplusimg.henrongyi.top/gva_header.jpg;comment:用户头像"` // 用户头像
  14. BaseColor string `json:"baseColor" gorm:"default:#fff;comment:基础颜色"` // 基础颜色
  15. ActiveColor string `json:"activeColor" gorm:"default:#1890ff;comment:活跃颜色"` // 活跃颜色
  16. AuthorityId string `json:"authorityId" gorm:"default:888;comment:用户角色ID"` // 用户角色ID
  17. Authority SysAuthority `json:"authority" gorm:"foreignKey:AuthorityId;references:AuthorityId;comment:用户角色"`
  18. Authorities []SysAuthority `json:"authorities" gorm:"many2many:sys_user_authority;"`
  19. }