user.go 658 B

12345678910111213141516171819202122232425
  1. package handler
  2. import (
  3. "cold-logistics/common/model"
  4. "fmt"
  5. coreModel "gogs.baozhida.cn/zoie/OAuth-core/model"
  6. )
  7. type SysUser struct {
  8. model.Model
  9. coreModel.User
  10. Type int `json:"type" gorm:"size:128;comment:类型"` // 管理员1 仓管2 司机3
  11. UserType string `json:"userType" gorm:"size:128;comment:用户类型"` // 系统用户-sys 客户-customer
  12. Openid string `json:"openid" gorm:"size:128;comment:微信openid"` // 微信openid
  13. model.ControlBy
  14. model.ModelTime
  15. }
  16. func (SysUser) TableName() string {
  17. return "sys_user"
  18. }
  19. func GetVerifyCodeCacheKey(phone string) string {
  20. return fmt.Sprintf("verify-code-%s", phone)
  21. }