cm_manager.go 1.6 KB

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