wx_user_log.go 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package wx_user_log
  2. import "time"
  3. // WxUserLog [...]
  4. type WxUserLog struct {
  5. ID int `gorm:"primaryKey;column:id;type:int(11);not null" json:"-"`
  6. UserID int `gorm:"column:user_id;type:int(11)" json:"userId"`
  7. OpenID string `gorm:"column:open_id;type:varchar(255)" json:"openId"`
  8. UnionID string `gorm:"column:union_id;type:varchar(255)" json:"unionId"`
  9. Mobile string `gorm:"column:mobile;type:varchar(50)" json:"mobile"`
  10. Email string `gorm:"column:email;type:varchar(50)" json:"email"`
  11. Handle string `gorm:"column:handle;type:varchar(20)" json:"handle"`
  12. Remark string `gorm:"column:remark;type:varchar(500)" json:"remark"`
  13. CreateTime time.Time `gorm:"column:create_time;type:datetime" json:"createTime"`
  14. }
  15. // TableName get sql table name.获取数据库表名
  16. func (m *WxUserLog) TableName() string {
  17. return "wx_user_log"
  18. }
  19. // WxUserLogColumns get sql column name.获取数据库列名
  20. var WxUserLogColumns = struct {
  21. ID string
  22. UserID string
  23. OpenID string
  24. UnionID string
  25. Mobile string
  26. Email string
  27. Handle string
  28. Remark string
  29. CreateTime string
  30. }{
  31. ID: "id",
  32. UserID: "user_id",
  33. OpenID: "open_id",
  34. UnionID: "union_id",
  35. Mobile: "mobile",
  36. Email: "email",
  37. Handle: "handle",
  38. Remark: "remark",
  39. CreateTime: "create_time",
  40. }