相关条件的统计
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.

user.go 2.5 KiB

1 year ago
123456789101112131415161718192021222324252627282930
  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. FirstArriveAt time.Time `json:"first_arrive_at" xorm:"not null default CURRENT_TIMESTAMP comment('到达该等级的时间') TIMESTAMP"`
  15. LevelArriveAt time.Time `json:"level_arrive_at" xorm:"not null default CURRENT_TIMESTAMP comment('到达该等级的时间') TIMESTAMP"`
  16. LevelExpireAt time.Time `json:"level_expire_at" xorm:"not null default CURRENT_TIMESTAMP comment('该等级过期时间') TIMESTAMP"`
  17. CreateAt time.Time `json:"create_at" xorm:"created not null default CURRENT_TIMESTAMP comment('创建时间') TIMESTAMP"`
  18. UpdateAt time.Time `json:"update_at" xorm:"updated default CURRENT_TIMESTAMP comment('最后修改资料时间') TIMESTAMP"`
  19. LastLoginAt time.Time `json:"last_login_at" xorm:"default CURRENT_TIMESTAMP comment('最近登录时间') TIMESTAMP"`
  20. DeleteAt int `json:"delete_at" xorm:"not null default 0 comment('是否删除;0未删除;1已删除') TINYINT(1)"`
  21. State int `json:"state" xorm:"not null default 1 comment('0未激活,1正常,2冻结,3删除') TINYINT(1)"`
  22. LastLoginIp string `json:"last_login_ip" xorm:"not null default '' comment('最后登录IP') VARCHAR(64)"`
  23. RegisterIp string `json:"register_ip" xorm:"not null default '' comment('注册IP') VARCHAR(64)"`
  24. Zone string `json:"zone" xorm:"not null default '86' comment('区号') VARCHAR(100)"`
  25. SalePhone string `json:"sale_phone" xorm:"not null default '' comment('') VARCHAR(100)"`
  26. IsFake int `json:"is_fake" xorm:"not null default 0 comment('0真实 1虚拟') TINYINT(1)"`
  27. IsMarketer int `json:"is_marketer" xorm:"not null default 0 comment('是否市商 0否 1是') TINYINT(1)"`
  28. }