cm_manager.go 1.7 KB

1234567891011121314151617181920212223242526272829303132333435
  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. IsAdmin int `xorm:"default 0 comment('管理ID') TINYINT(1)"`
  18. RealName string `xorm:"comment('真实姓名') VARCHAR(10)"`
  19. Telephone string `xorm:"comment('联系电话(CLD字段)') VARCHAR(11)"`
  20. LoginIp string `xorm:"comment('登录ip') VARCHAR(12)"`
  21. Token string `xorm:"not null comment('随机token') VARCHAR(32)"`
  22. CanLogin int `xorm:"default 1 comment('是否可登录') TINYINT(1)"`
  23. StaffId int `xorm:"default 0 comment('员工ID') INT(11)"`
  24. Office string `xorm:"default 12 comment('办事处id(CLD字段)') VARCHAR(32)"`
  25. Category string `xorm:"comment('办事处名称(CLD字段)') VARCHAR(32)"`
  26. Email string `xorm:"comment('邮箱(CLD字段)') VARCHAR(255)"`
  27. Qq string `xorm:"comment('qq号(CLD字段)') VARCHAR(15)"`
  28. Fixedphone string `xorm:"comment('固定电话(CLD字段)') VARCHAR(15)"`
  29. Position string `xorm:"comment('职位(CLD字段)') VARCHAR(15)"`
  30. Avatar string `xorm:"comment('cld头像地址') VARCHAR(255)"`
  31. CreateTime time.Time `xorm:"comment('创建时间') DATETIME"`
  32. UpdateTime time.Time `xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') TIMESTAMP"`
  33. }