yb_activity_poster.go 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. package yb_activity_poster
  2. import "time"
  3. // YbActivityPoster 活动海报表
  4. type YbActivityPoster struct {
  5. ActivityPosterID uint32 `gorm:"primaryKey;column:activity_poster_id;type:int(11) unsigned;not null" json:"-"`
  6. ActivityID uint32 `gorm:"index:idx_activity_id;column:activity_id;type:int(11) unsigned;not null;default:0" json:"activityId"` // 活动id
  7. URL string `gorm:"unique;column:url;type:varchar(500);not null;default:''" json:"url"` // 海报地址
  8. Name string `gorm:"column:name;type:varchar(255);not null;default:''" json:"name"` // 海报名称
  9. CreateTime time.Time `gorm:"column:create_time;type:timestamp;default:CURRENT_TIMESTAMP" json:"createTime"`
  10. }
  11. // TableName get sql table name.获取数据库表名
  12. func (m *YbActivityPoster) TableName() string {
  13. return "yb_activity_poster"
  14. }
  15. // YbActivityPosterColumns get sql column name.获取数据库列名
  16. var YbActivityPosterColumns = struct {
  17. ActivityPosterID string
  18. ActivityID string
  19. URL string
  20. Name string
  21. CreateTime string
  22. }{
  23. ActivityPosterID: "activity_poster_id",
  24. ActivityID: "activity_id",
  25. URL: "url",
  26. Name: "name",
  27. CreateTime: "create_time",
  28. }