client_user.go 2.1 KB

1234567891011121314151617181920212223242526272829303132
  1. // 自动生成模板ClientUser
  2. package client
  3. import (
  4. "github.com/flipped-aurora/gin-vue-admin/server/global"
  5. "github.com/google/uuid"
  6. )
  7. // 客户端用户 结构体 ClientUser
  8. type ClientUser struct {
  9. global.GVA_MODEL
  10. UUID uuid.UUID `json:"uuid" form:"uuid" gorm:"column:uuid;comment:UUID;"` //UUID
  11. Avatar string `json:"avatar" form:"avatar" gorm:"column:avatar;comment:头像;default:https://qmplusimg.henrongyi.top/gva_header.jpg"` //头像
  12. Username string `json:"username" form:"username" gorm:"column:username;comment:用户名;" binding:"required"` //用户名
  13. Password string `json:"password" form:"password" gorm:"column:password;comment:密码;" binding:"required"` //密码
  14. Nickname string `json:"nickname" form:"nickname" gorm:"column:nickname;comment:昵称;"` //昵称
  15. Gender string `json:"gender" form:"gender" gorm:"column:gender;comment:性别;"` //性别
  16. Phone string `json:"phone" form:"phone" gorm:"column:phone;comment:手机号;"` //手机号
  17. Email string `json:"email" form:"email" gorm:"column:email;comment:邮箱;"` //邮箱
  18. CreatedBy uint `gorm:"column:created_by;comment:创建者"`
  19. UpdatedBy uint `gorm:"column:updated_by;comment:更新者"`
  20. DeletedBy uint `gorm:"column:deleted_by;comment:删除者"`
  21. Building string `json:"building" form:"building" gorm:"comment:栋;column:building;size:50;"` //栋
  22. Room string `json:"room" form:"room" gorm:"comment:房间编号;column:room;size:50;"` //房间编号
  23. Pen string `json:"pen" form:"pen" gorm:"comment:栏位编号;column:pen;size:50;"` //栏位编号
  24. }
  25. // TableName 客户端用户 ClientUser自定义表名 client_user
  26. func (ClientUser) TableName() string {
  27. return "client_user"
  28. }