修改了食品标内容

This commit is contained in:
wucongxing8150 2024-08-30 10:00:10 +08:00
parent b0ddc80d18
commit d504660eee
2 changed files with 26 additions and 23 deletions

View File

@ -11,7 +11,8 @@ type VideoDto struct {
VideoTitle string `json:"video_title"` // 视频标题
VideoStatus int `json:"article_status"` // 视频状态1:正常 2:禁用)
VoteNum uint `json:"vote_num"` // 总票数
VideoUrl string `json:"video_url"` // 视频地址
VideoNo string `json:"video_no"` // 视频编号(保利)
VideoContent string `json:"video_content"` // 视频内容
CreatedAt model.LocalTime `json:"created_at"` // 创建时间
UpdatedAt model.LocalTime `json:"updated_at"` // 更新时间
VideoAuthor []*VideoAuthorDto `json:"video_author"` // 作者
@ -31,7 +32,7 @@ func GetVideoListDto(m []*model.Video) []*VideoDto {
VideoTitle: v.VideoTitle,
VideoStatus: v.VideoStatus,
VoteNum: v.VoteNum,
VideoUrl: v.VideoUrl,
VideoNo: v.VideoNo,
CreatedAt: v.CreatedAt,
UpdatedAt: v.UpdatedAt,
}
@ -56,7 +57,8 @@ func GetVideoDto(m *model.Video) *VideoDto {
VideoTitle: m.VideoTitle,
VideoStatus: m.VideoStatus,
VoteNum: m.VoteNum,
VideoUrl: m.VideoUrl,
VideoNo: m.VideoNo,
VideoContent: m.VideoContent,
CreatedAt: m.CreatedAt,
UpdatedAt: m.UpdatedAt,
}

View File

@ -12,7 +12,8 @@ type Video struct {
VideoTitle string `gorm:"column:video_title;type:varchar(200);comment:视频标题" json:"video_title"`
VideoStatus int `gorm:"column:video_status;type:tinyint(1);default:1;comment:视频状态1:正常 2:禁用)" json:"video_status"`
VoteNum uint `gorm:"column:vote_num;type:int(10) unsigned;default:0;comment:总票数" json:"vote_num"`
VideoUrl string `gorm:"column:video_url;type:varchar(255);comment:视频地址" json:"video_url"`
VideoNo string `gorm:"column:video_no;type:varchar(255);comment:视频编号(保利)" json:"video_no"`
VideoContent string `gorm:"column:video_content;type:text;comment:视频内容" json:"video_content"`
Model
VideoAuthor []*VideoAuthor `gorm:"foreignKey:VideoId;references:video_id" json:"video_author"`
}