cm_manager.go 1.5 KB

123456789101112131415161718192021222324252627
  1. package models
  2. import (
  3. "time"
  4. )
  5. type CmManager struct {
  6. Id int `xorm:"not null pk autoincr comment('自增ID') INT(11)"`
  7. Username string `xorm:"not null comment('用户名') unique VARCHAR(32)"`
  8. Password string `xorm:"not null comment('密码') VARCHAR(32)"`
  9. LastLogin int `xorm:"comment('最后一次登录时间') INT(11)"`
  10. GroupId int `xorm:"default 0 comment('用户组ID') INT(11)"`
  11. RealName string `xorm:"comment('真实姓名') VARCHAR(10)"`
  12. Telephone string `xorm:"comment('联系电话(CLD字段)') VARCHAR(11)"`
  13. LoginIp string `xorm:"comment('登录ip') VARCHAR(12)"`
  14. Token string `xorm:"not null comment('随机token') VARCHAR(32)"`
  15. CanLogin int `xorm:"default 1 comment('是否可登录') TINYINT(1)"`
  16. Office int `xorm:"default 12 comment('办事处id(CLD字段)') INT(11)"`
  17. Category string `xorm:"comment('办事处名称(CLD字段)') VARCHAR(32)"`
  18. Email string `xorm:"comment('邮箱(CLD字段)') VARCHAR(255)"`
  19. Qq string `xorm:"comment('qq号(CLD字段)') VARCHAR(15)"`
  20. Fixedphone string `xorm:"comment('固定电话(CLD字段)') VARCHAR(15)"`
  21. Position string `xorm:"comment('职位(CLD字段)') VARCHAR(15)"`
  22. Avatar string `xorm:"comment('cld头像地址') VARCHAR(255)"`
  23. CreateTime int `xorm:"comment('创建时间') INT(11)"`
  24. UpdateTime time.Time `xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') TIMESTAMP"`
  25. }