package yb import ( "github.com/beego/beego/v2/client/orm" "time" ) // RoadVideo 路演视频 type RoadVideo struct { RoadVideoId int `orm:"column(road_video_id);pk" description:"视频ID"` Title string `description:"视频标题"` CoverImgUrl string `description:"封面图地址"` VideoUrl string `description:"视频地址"` VideoSeconds string `description:"视频时长,单位秒"` PublishState int `description:"发布状态:0-待发布 1-已发布"` ChartPermissionIds string `description:"品种权限ID,用英文逗号分隔"` SendThsState int `description:"客群消息推送状态:0-待推送 1-已推送"` IsDeleted int `description:"是否已删除 0-否 1-是"` PublishTime time.Time `description:"发布时间"` SendThsTime time.Time `description:"推送客群时间"` CreateTime time.Time `description:"提问时间"` ModifyTime time.Time `description:"修改时间"` DeleteTime time.Time `description:"删除时间"` } func (item *RoadVideo) TableName() string { return "yb_road_video" } // GetRoadVideoById 主键获取视频 func GetRoadVideoById(videoId int) (item *RoadVideo, err error) { o := orm.NewOrm() sql := `SELECT * FROM yb_road_video WHERE road_video_id = ? AND is_deleted = 0 LIMIT 1` err = o.Raw(sql, videoId).QueryRow(&item) return }