entity.go 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. package yb_community_video
  2. import "time"
  3. // YbCommunityVideo 研报-视频社区表
  4. type YbCommunityVideo struct {
  5. CommunityVideoID int `gorm:"primaryKey;column:community_video_id;type:int(10) unsigned;not null" json:"-"`
  6. Title string `gorm:"column:title;type:varchar(255);not null;default:''" json:"title"` // 视频标题
  7. VarietyTagId int `gorm:"index:idx_variety_tag_id;column:variety_tag_id;type:int(10) unsigned;not null;default:0" json:"varietyTagId"` // 品种权限ID
  8. VarietyTagName string `gorm:"column:variety_tag_name;type:varchar(30);not null;default:''" json:"varietyTagName"` // 品种权限名称
  9. CoverImgURL string `gorm:"column:cover_img_url;type:varchar(255);not null;default:''" json:"coverImgUrl"` // 封面图地址
  10. VideoURL string `gorm:"column:video_url;type:varchar(255);not null;default:''" json:"videoUrl"` // 视频地址
  11. VideoSeconds string `gorm:"column:video_seconds;type:varchar(30);not null;default:''" json:"videoSeconds"` // 视频时长
  12. PublishState int `gorm:"column:publish_state;type:tinyint(4) unsigned;not null;default:0" json:"publishState"` // 发布状态:0-未发布 1-已发布
  13. SendThsState int `gorm:"column:send_ths_state;type:tinyint(4) unsigned;not null;default:0" json:"sendThsState"` // 推送客群状态:0-未推送 1-已推送
  14. IsDeleted int `gorm:"column:is_deleted;type:tinyint(4) unsigned;not null;default:0" json:"isDeleted"` // 是否已删除:0-未删除 1-已删除
  15. PublishTime time.Time `gorm:"column:publish_time;type:datetime" json:"publishTime"` // 发布时间
  16. SendThsTime time.Time `gorm:"column:send_ths_time;type:datetime" json:"sendThsTime"` // 推送客群时间
  17. CreateTime time.Time `gorm:"column:create_time;type:datetime;default:CURRENT_TIMESTAMP" json:"createTime"` // 创建时间
  18. ModifyTime time.Time `gorm:"column:modify_time;type:datetime;default:CURRENT_TIMESTAMP" json:"modifyTime"` // 更新时间
  19. DeleteTime time.Time `gorm:"column:delete_time;type:datetime" json:"deleteTime"`
  20. }
  21. // TableName get sql table name.获取数据库表名
  22. func (m *YbCommunityVideo) TableName() string {
  23. return "yb_community_video"
  24. }
  25. // YbCommunityVideoColumns get sql column name.获取数据库列名
  26. var YbCommunityVideoColumns = struct {
  27. CommunityVideoID string
  28. Title string
  29. varietyTagId string
  30. varietyTagName string
  31. CoverImgURL string
  32. VideoURL string
  33. VideoSeconds string
  34. PublishState string
  35. SendThsState string
  36. IsDeleted string
  37. PublishTime string
  38. SendThsTime string
  39. CreateTime string
  40. ModifyTime string
  41. DeleteTime string
  42. }{
  43. CommunityVideoID: "community_video_id",
  44. Title: "title",
  45. varietyTagId: "variety_tag_id",
  46. varietyTagName: "variety_tag_name",
  47. CoverImgURL: "cover_img_url",
  48. VideoURL: "video_url",
  49. VideoSeconds: "video_seconds",
  50. PublishState: "publish_state",
  51. SendThsState: "send_ths_state",
  52. IsDeleted: "is_deleted",
  53. PublishTime: "publish_time",
  54. SendThsTime: "send_ths_time",
  55. CreateTime: "create_time",
  56. ModifyTime: "modify_time",
  57. DeleteTime: "delete_time",
  58. }