Road_video.go 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. package yb
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. // RoadVideo 路演视频
  7. type RoadVideo struct {
  8. RoadVideoId int `orm:"column(road_video_id);pk" description:"视频ID"`
  9. Title string `description:"视频标题"`
  10. CoverImgUrl string `description:"封面图地址"`
  11. VideoUrl string `description:"视频地址"`
  12. VideoSeconds string `description:"视频时长,单位秒"`
  13. PublishState int `description:"发布状态:0-待发布 1-已发布"`
  14. ChartPermissionIds string `description:"品种权限ID,用英文逗号分隔"`
  15. SendThsState int `description:"客群消息推送状态:0-待推送 1-已推送"`
  16. IsDeleted int `description:"是否已删除 0-否 1-是"`
  17. PublishTime time.Time `description:"发布时间"`
  18. SendThsTime time.Time `description:"推送客群时间"`
  19. CreateTime time.Time `description:"提问时间"`
  20. ModifyTime time.Time `description:"修改时间"`
  21. DeleteTime time.Time `description:"删除时间"`
  22. }
  23. func (item *RoadVideo) TableName() string {
  24. return "yb_road_video"
  25. }
  26. // GetRoadVideoById 主键获取视频
  27. func GetRoadVideoById(videoId int) (item *RoadVideo, err error) {
  28. o := orm.NewOrm()
  29. sql := `SELECT * FROM yb_road_video WHERE road_video_id = ? AND is_deleted = 0 LIMIT 1`
  30. err = o.Raw(sql, videoId).QueryRow(&item)
  31. return
  32. }