定制每日抽奖
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.

28 lines
2.1 KiB

  1. package model
  2. import (
  3. "time"
  4. )
  5. type User struct {
  6. Uid int `json:"uid" xorm:"not null pk autoincr comment('主键ID') INT(10)"`
  7. Username string `json:"username" xorm:"not null default '' comment('用户名') index VARCHAR(50)"`
  8. Password string `json:"password" xorm:"not null default '' comment('密码') CHAR(32)"`
  9. Email string `json:"email" xorm:"not null default '' comment('邮箱') VARCHAR(128)"`
  10. Phone string `json:"phone" xorm:"not null default '' comment('联系电话') VARCHAR(20)"`
  11. Nickname string `json:"nickname" xorm:"not null default '' comment('昵称') VARCHAR(20)"`
  12. Level int `json:"level" xorm:"not null default 0 comment('用户等级id') INT(11)"`
  13. InviteTotal int `json:"invite_total" xorm:"not null default 0 comment('直推邀请总人数') INT(11)"`
  14. LevelArriveAt time.Time `json:"level_arrive_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('到达该等级的时间') TIMESTAMP"`
  15. LevelExpireAt time.Time `json:"level_expire_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('该等级过期时间') TIMESTAMP"`
  16. CreateAt time.Time `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('创建时间') TIMESTAMP"`
  17. UpdateAt time.Time `json:"update_at" xorm:"default 'CURRENT_TIMESTAMP' comment('最后修改资料时间') TIMESTAMP"`
  18. LastLoginAt time.Time `json:"last_login_at" xorm:"default 'CURRENT_TIMESTAMP' comment('最近登录时间') TIMESTAMP"`
  19. DeleteAt int `json:"delete_at" xorm:"not null default 0 comment('是否删除;0未删除;1已删除') TINYINT(1)"`
  20. State int `json:"state" xorm:"not null default 1 comment('0未激活,1正常,2冻结') TINYINT(1)"`
  21. LastLoginIp string `json:"last_login_ip" xorm:"not null default '' comment('最后登录IP') VARCHAR(64)"`
  22. RegisterIp string `json:"register_ip" xorm:"not null default '' comment('注册IP') VARCHAR(64)"`
  23. AdminId string `json:"admin_id" xorm:"not null default '' comment('管理员id') VARCHAR(5000)"`
  24. IsFake int `json:"is_fake" xorm:"not null default 0 comment('0真实 1虚拟') TINYINT(1)"`
  25. }