entity.go 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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:"index:idx_user_id;column:user_id;type:int(10) unsigned;not null;default:0" json:"userId"` // 点击音频的用户ID
  8. Mobile string `gorm:"column:mobile;type:varchar(30);not null;default:''" json:"mobile"` // 手机号
  9. RealName string `gorm:"column:real_name;type:varchar(100);not null;default:''" json:"realName"` // 真实姓名
  10. NickName string `gorm:"column:nick_name;type:varchar(100);not null;default:''" json:"nickName"` // 昵称
  11. CompanyID int `gorm:"column:company_id;type:int(10) unsigned;not null;default:0" json:"companyId"` // 客户ID
  12. CompanyName string `gorm:"column:company_name;type:varchar(100);not null;default:''" json:"companyName"` // 客户名称
  13. CompanyStatus string `gorm:"column:company_status;type:varchar(30);not null;default:''" json:"companyStatus"` // 客户状态
  14. SourceAgent int `gorm:"column:source_agent;type:tinyint(4) unsigned;not null;default:1" json:"sourceAgent"` // 操作来源,1:小程序,2:小程序 pc 3:弘则研究公众号,4:web pc
  15. SellerID int `gorm:"column:seller_id;type:int(11)" json:"sellerId"`
  16. Type int8 `gorm:"column:type;type:tinyint(4); unsigned;not null;default:1" json:"type"` //统计类型(1 视频社区,2 路演视频)
  17. CreateTime time.Time `gorm:"column:create_time;type:datetime;default:CURRENT_TIMESTAMP" json:"createTime"` // 创建时间
  18. StopSeconds int `gorm:"column:stop_seconds" json:"stop_seconds"` //停止时的秒数
  19. }
  20. // TableName get sql table name.获取数据库表名
  21. func (m *YbCommunityVideoPlayLog) TableName() string {
  22. return "yb_community_video_play_log"
  23. }
  24. // YbCommunityVideoPlayLogColumns get sql column name.获取数据库列名
  25. var YbCommunityVideoPlayLogColumns = struct {
  26. ID string
  27. CommunityVideoID string
  28. UserID string
  29. Mobile string
  30. RealName string
  31. NickName string
  32. CompanyID string
  33. CompanyName string
  34. CompanyStatus string
  35. SourceAgent string
  36. CreateTime string
  37. StopSeconds string
  38. }{
  39. ID: "id",
  40. CommunityVideoID: "community_video_id",
  41. UserID: "user_id",
  42. Mobile: "mobile",
  43. RealName: "real_name",
  44. NickName: "nick_name",
  45. CompanyID: "company_id",
  46. CompanyName: "company_name",
  47. CompanyStatus: "company_status",
  48. SourceAgent: "source_agent",
  49. CreateTime: "create_time",
  50. StopSeconds: "stop_seconds",
  51. }