entity.go 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package yb_road_video
  2. import "time"
  3. // YbRoadVideo 研报-路演视频(线上路演)表
  4. type YbRoadVideo struct {
  5. RoadVideoID int `gorm:"primaryKey;column:road_video_id;type:int(10) unsigned;not null" json:"-"`
  6. Title string `gorm:"column:title;type:varchar(255);not null;default:''" json:"title"` // 视频标题
  7. ChartPermissionIds string `gorm:"column:chart_permission_ids;type:varchar(255);not null;default:''" json:"chartPermissionIds"` // 品种权限ID, 用英文逗号拼接
  8. CoverImgURL string `gorm:"column:cover_img_url;type:varchar(255);not null;default:''" json:"coverImgUrl"` // 封面图地址
  9. VideoURL string `gorm:"column:video_url;type:varchar(255);not null;default:''" json:"videoUrl"` // 视频地址
  10. VideoSeconds string `gorm:"column:video_seconds;type:varchar(30);not null;default:''" json:"videoSeconds"` // 视频时长
  11. PublishState int `gorm:"column:publish_state;type:tinyint(4) unsigned;not null;default:0" json:"publishState"` // 发布状态:0-未发布 1-已发布
  12. SendThsState int `gorm:"column:send_ths_state;type:tinyint(4) unsigned;not null;default:0" json:"sendThsState"` // 推送客群状态:0-未推送 1-已推送
  13. IsDeleted int `gorm:"column:is_deleted;type:tinyint(4) unsigned;not null;default:0" json:"isDeleted"` // 是否已删除:0-未删除 1-已删除
  14. AdminId int `gorm:"column:admin_id;type:int(11) unsigned;not null;default:0" json:"adminId"` // 创建人账号
  15. AdminRealName string `gorm:"column:admin_real_name;type:varchar(50)" json:"adminRealName"` // 创建人姓名
  16. PublishTime time.Time `gorm:"column:publish_time;type:datetime" json:"publishTime"` // 发布时间
  17. SendThsTime time.Time `gorm:"column:send_ths_time;type:datetime" json:"sendThsTime"` // 推送客群时间
  18. CreateTime time.Time `gorm:"column:create_time;type:datetime;default:CURRENT_TIMESTAMP" json:"createTime"` // 创建时间
  19. ModifyTime time.Time `gorm:"column:modify_time;type:datetime;default:CURRENT_TIMESTAMP" json:"modifyTime"` // 更新时间
  20. DeleteTime time.Time `gorm:"column:delete_time;type:datetime" json:"deleteTime"`
  21. ReportID int `gorm:"column:report_id;type:int(10) unsigned;not null;default:0" json:"reportId"` // 绑定的报告ID
  22. }
  23. // TableName get sql table name.获取数据库表名
  24. func (r *YbRoadVideo) TableName() string {
  25. return "yb_road_video"
  26. }
  27. // YbCommunityVideoColumns get sql column name.获取数据库列名
  28. var YbRoadVideoColumns = struct {
  29. RoadVideoID string
  30. Title string
  31. ChartPermissionIds string
  32. CoverImgURL string
  33. VideoURL string
  34. VideoSeconds string
  35. PublishState string
  36. SendThsState string
  37. IsDeleted string
  38. PublishTime string
  39. SendThsTime string
  40. CreateTime string
  41. ModifyTime string
  42. DeleteTime string
  43. ReportID string
  44. }{
  45. RoadVideoID: "road_video_id",
  46. Title: "title",
  47. ChartPermissionIds: "chart_permission_ids",
  48. CoverImgURL: "cover_img_url",
  49. VideoURL: "video_url",
  50. VideoSeconds: "video_seconds",
  51. PublishState: "publish_state",
  52. SendThsState: "send_ths_state",
  53. IsDeleted: "is_deleted",
  54. PublishTime: "publish_time",
  55. SendThsTime: "send_ths_time",
  56. CreateTime: "create_time",
  57. ModifyTime: "modify_time",
  58. DeleteTime: "delete_time",
  59. ReportID: "report_id",
  60. }