entity.go 1.5 KB

1234567891011121314151617181920212223242526272829303132
  1. package yb_community_video_play_log
  2. import "time"
  3. // YbCommunityVideoPlayLog 研报视频社区播放记录表
  4. type YbCommunityVideoPlayLog struct {
  5. ID int `gorm:"primaryKey;column:id;type:bigint(20) unsigned;not null" json:"-"`
  6. CommunityVideoID int `gorm:"index:idx_community_video_id;column:community_video_id;type:int(10) unsigned;not null" json:"communityVideoId"` // 回答音频ID
  7. UserID int `gorm:"column:user_id;type:int(10) unsigned;not null;default:0" json:"userId"` // 点击音频的用户ID
  8. SourceAgent int `gorm:"column:source_agent;type:tinyint(4) unsigned;not null;default:1" json:"sourceAgent"` // 操作来源,1:小程序,2:小程序 pc 3:弘则研究公众号,4:web pc
  9. CreateTime time.Time `gorm:"column:create_time;type:datetime;default:CURRENT_TIMESTAMP" json:"createTime"` // 创建时间
  10. }
  11. // TableName get sql table name.获取数据库表名
  12. func (m *YbCommunityVideoPlayLog) TableName() string {
  13. return "yb_community_video_play_log"
  14. }
  15. // YbCommunityVideoPlayLogColumns get sql column name.获取数据库列名
  16. var YbCommunityVideoPlayLogColumns = struct {
  17. ID string
  18. CommunityVideoID string
  19. UserID string
  20. SourceAgent string
  21. CreateTime string
  22. }{
  23. ID: "id",
  24. CommunityVideoID: "community_video_id",
  25. UserID: "user_id",
  26. SourceAgent: "source_agent",
  27. CreateTime: "create_time",
  28. }