package vidmod import ( "time" "91porn-server/common/stderr" "91porn-server/models/commod" "91porn-server/models/v/locmod" "91porn-server/models/v/usermod" "github.com/shopspring/decimal" "go.mongodb.org/mongo-driver/bson/primitive" ) const ( Merging = "Merging" // 合并中 MergeCompleted = "MergeCompleted" //合并完成 MergeError = "MergeError" // 合并失败 Converting = "Converting" //格式转换中 ConvertCompleted = "ConvertCompleted" //转换完成 ConvertError = "ConvertError" // 转换失败 UploadLoadingToFs = "UpLoading" // 正在上传中 UploadCompleted = "UploadCompleted" // 上传完成 Completed = "Completed" // 完成 FileUploadError = "FileUploadError" //文件上传失败 ) // WebSubmitReq web端视频上传请求 type WebSubmitReq struct { UID uint64 `form:"uid" json:"uid" binding:"required"` NewsType string `form:"newsType" json:"newsType"` Title string `form:"title" json:"title"` Content string `form:"content" json:"content" bson:"content"` Tags []string `form:"tags" json:"tags" binding:"required"` PlayTime uint `form:"playTime" json:"playTime"` Cover string `form:"cover" json:"cover"` CoverThumb string `form:"coverThumb" json:"coverThumb"` VerticalCover string `form:"verticalCover" json:"verticalCover" ` //竖版封 SeriesCover []string `form:"seriesCover" json:"seriesCover"` Via string `form:"via" json:"via"` Coins int64 `form:"coins" json:"coins"` Size int `form:"size" json:"size"` Resolution string `form:"resolution" json:"resolution"` Ratio float64 `json:"ratio" bson:"ratio"` //宽高比 MimeType string `form:"mimeType" json:"mimeType"` Location locmod.Location `form:"location" json:"location"` Actor string `form:"actor" json:"actor"` SourceID string `form:"sourceID" json:"sourceID"` SourceURL string `form:"sourceURL" json:"sourceURL"` MD5 string `form:"md5" json:"md5"` Filename string `form:"filename" json:"filename"` FreeTime int `form:"freeTime" json:"freeTime"` Width int `form:"width" json:"width" ` // 视频宽度 Height int `form:"height" json:"height" ` // 视频高度 MDSID string `json:"mdsID" ` Status int `json:"status"` // 状态,0 未审核 1通过 2审核失败 3视为免费 默认为0 Account string `json:"account"` //审核帐号 SeedLinkUrl string `form:"seedLinkUrl" json:"seedLinkUrl" bson:"seedLinkUrl"` // 种子链接内容 SeedSize uint64 `json:"seedSize" bson:"seedSize,omitempty"` // 种子影片大小 byte SeedPlayTime uint64 `json:"seedPlayTime" bson:"seedPlayTime,omitempty"` // 种子影片时长 RichText string `form:"richText" json:"richText"` // 富文本内容 PreviewStart int `form:"previewStart" json:"previewStart"` // 预览时间起始点 } // ListReq 视频列表请求 type ListReq struct { Status int `form:"status" json:"status"` Key string `form:"key" json:"key"` Value int `form:"value" json:"value"` IsFree int `form:"isFree" json:"isFree"` IsUserUp int `form:"isUserUp" json:"isUserUp"` Title string `form:"title" json:"title"` UID uint64 `form:"uid" json:"uid"` Start time.Time `form:"start" json:"start"` End time.Time `form:"end" json:"end"` Chosen int `form:"chosen" json:"chosen"` FreeArea int `form:"freeArea" json:"freeArea"` Tag string `form:"tag" json:"tag"` ID string `form:"id" json:"id"` IsPretendAcc int `form:"isPretendAcc" json:"isPretendAcc"` //是否马甲账号,0,所有,1,是,2,否 NewsType string `form:"newsType" json:"newsType"` //帖子类型,0,所以;1,视频,2,图集 LiaoBaTop *bool `form:"liaoBaTop" json:"liaoBaTop"` //"撩吧"页面置顶 SectionID string `form:"sectionID" json:"sectionID"` //专题ID IsSortedUnderModule bool `form:"isSortedUnderModule" json:"isSortedUnderModule"` //视频在专题下是否设置了排序码 IsPush bool `form:"isPush" bson:"isPush"` //是否强推 IsRecommended *bool `form:"isRecommended" bson:"isRecommended"` IsHappinessPlazaTop *bool `form:"isHappinessPlazaTop"` // 是否幸福广场置顶 ReviewAccount string `form:"reviewAccount" json:"reviewAccount"` // 审核管理员账号 ShowType *int `json:"showType" form:"showType"` // 0-所有的人都可以看 1-奇数可看 2-偶数可看 commod.Page } // AwsPullReq 从AWS拉取视频信息请求接口 type AwsPullReq struct { ID string `json:"id"` Type string `json:"type"` Tag string `json:"tag"` MaxPlayTime int `json:"maxPlayTime"` MinPlayTime int `json:"minPlayTime"` PageSize int `json:"pageSize"` Page int `json:"page"` Status string `json:"status"` NewUpdateAt string `json:"newUpdateAt"` } // PullReq 前端参数传递 type PullReq struct { Token string `json:"token" binding:"required"` SyncType string `json:"syncType" binding:"required"` //同步类型 SP-同步视频 SERIES-同步套图 UID []uint64 `json:"uids" binding:"required"` Cityes []string `json:"cityes" binding:"required"` RStatus string `json:"rStatus" binding:"required"` //审核状态, Coins string `json:"coins" binding:"required"` Retry bool `json:"retry"` //表示从某一批次 从头开始导入数据 AwsPullReq } // EditInfo 修改内容 type EditInfo struct { NewsType *string `form:"newsType" json:"newsType" bson:"newsType,omitempty"` // 帖子类型, SP,COVER,SEED_LINK PublisherID *uint64 `form:"publisherID" json:"publisherID" bson:"publisherID,omitempty"` // 上传者ID Cover *string `form:"cover" json:"cover,omitempty" bson:"cover,omitempty"` //封面大图 CoverThumb *string `form:"coverThumb" json:"coverThumb,omitempty" bson:"coverThumb,omitempty"` FakeLikeCount *int `form:"fakeLikeCount" json:"fakeLikeCount,omitempty" bson:"fakeLikeCount,omitempty"` //点赞假数据 FakeCommentCount *int `form:"fakeCommentCount" json:"fakeCommentCount,omitempty" bson:"fakeCommentCount,omitempty"` //评论假数据 FakeShareCount *int `form:"fakeShareCount" json:"fakeShareCount,omitempty" bson:"fakeShareCount,omitempty"` //分享假数据 FakePlayCount *int `form:"fakePlayCount" json:"fakePlayCount,omitempty" bson:"fakePlayCount,omitempty"` //播发假数据 FreeTime *int `form:"freeTime" json:"freeTime,omitempty" bson:"freeTime,omitempty"` //免费观影时长 Coins *uint `form:"coins" json:"coins,omitempty" bson:"coins,omitempty"` //定价 Title *string `form:"title" json:"title,omitempty" bson:"title,omitempty"` Content *string `form:"content" json:"content,omitempty" bson:"content,omitempty"` // 帖子内容 UpTag *string `form:"upTag" json:"upTag,omitempty" bson:"upTag,omitempty"` // 博主认证 Status *int `form:"status" json:"status" bson:"status,omitempty"` // 状态 CreatedAt *string `form:"createdAt" json:"createdAt,omitempty" bson:"createdAt,omitempty"` //视频上传时间 SeriesCover *[]string `form:"seriesCover" json:"seriesCover" bson:"seriesCover,omitempty"` //帖子套图 SeriesNum *int `form:"seriesNum" json:"seriesNum" bson:"seriesNum,omitempty"` //图集数量 RecoWeight *int `form:"recoWeight" json:"recoWeight" bson:"recoWeight,omitempty"` //推荐权重 -1,不可推荐 LinkUrl *string `form:"linkUrl" json:"linkUrl" bson:"linkUrl,omitempty"` PreviewURL *string `json:"previewURL" bson:"previewURL,omitempty"` // 预览视频资源地址(并非所有视频都有预览) SortCode *int `form:"sortCode" json:"sortCode" bson:"sortCode"` //排序号 目前只有广告帖子有用 FakeRewarded *int `form:"fakeRewarded" json:"fakeRewarded" bson:"fakeRewarded,omitempty"` //(假)获得打赏次数 LiaoBaTop *bool `form:"liaoBaTop" json:"liaoBaTop" bson:"liaoBaTop,omitempty"` //"撩吧"页面置顶 LiaoBaTopSort *int `form:"liaoBaTopSort" json:"liaoBaTopSort" bson:"liaoBaTopSort,omitempty"` //"撩吧"页面置顶 排序 WorksSort *int `form:"worksSort" json:"worksSort" bson:"worksSort,omitempty"` //作品排序 ActivityID *string `form:"activityId" json:"activityId" bson:"activityId,omitempty"` //参赛作品活动ID HappinessPlazaTop *int32 `json:"happinessPlazaTop" bson:"happinessPlazaTop,omitempty"` // 幸福广场置顶 ShareSort *int `json:"shareSort" bson:"shareSort,omitempty"` // 分享视频列表排序. 出现在当用户分享视频时的推荐列表里. <=0时表示不推荐 SeedLinkUrl *string `json:"seedLinkUrl" bson:"seedLinkUrl,omitempty"` // 种子下载链接 SeedSize *int `json:"seedSize" bson:"seedSize,omitempty"` // 种子影片大小 byte SeedPlayTime *uint `json:"seedPlayTime" bson:"seedPlayTime,omitempty"` // 种子影片时长 SeedDownloadDesc *string `json:"seedDownloadDesc" bson:"seedDownloadDesc,omitempty"` // 种子下载说明 SeedTips *string `json:"seedTips" bson:"seedTips,omitempty"` // 种子温馨提示 PreviewStart *int `json:"previewStart" form:"previewStart" bson:"previewStart,omitempty"` // 预览时间起点 RichText *string `json:"richText" bson:"-"` // 富文本内容(单独更新,不需要bson) TimeNodeList *[]TimeNode `json:"timeNodeList" form:"timeNodeList"` // 时间节点 ShowType *int `json:"showType" bson:"showType,omitempty"` // 0-所有的人都可以看 1-奇数可看 2-偶数可看 DownloadAllow *int `json:"downloadAllow" bson:"downloadAllow,omitempty"` // 允许下载的VIP级别,0表示不允许下载 1表示VIP 2表示免费 } // EditReq 视频更新参数 type EditReq struct { ID string `form:"id" json:"id"` Type int `form:"type" json:"type"` //0 所有 1只标签 2只更新富文本 Tags []string `form:"tags" json:"tags" bson:"tags,omitempty"` TagSort []struct { TagId string `form:"tagId" json:"tagId"` SortCode int `form:"sortCode" json:"sortCode"` } `form:"tagSort" json:"tagSort"` EditInfo } // DeleteReq 视频批量操作参数 type DeleteReq struct { IDs []string `json:"ids"` } // BatchReq 视频批量操作参数 type BatchReq struct { IDs []string `json:"ids"` Pass int `json:"pass"` //1通过 2不通过 3通过并修改成免费视屏 Reason string `json:"reason"` //不通过时的理由 } // BatchEditInfo 批量更新的结构 type BatchEditInfo struct { ID string `json:"id"` Reason string `json:"reason"` Coins int `json:"coins"` FreeTime int `json:"freeTime"` } // EditManyReq 视频批量更新参数 type EditManyReq struct { IDs []string `json:"ids"` Field string `json:"field"` //批量更新字段 Status bool `json:"status"` //更新视频状态,比如免费专区/取消免费专区,收费/取消收费,精选/取消精选 TagIds []primitive.ObjectID `json:"tagIds"` // tag更新 Coins *int `json:"coins"` // 价格 PublisherID *uint64 `form:"publisherID" json:"publisherID"` // 上传者ID OriginPublisherID *uint64 `form:"originPublisherID" json:"originPublisherID"` // 原上传者ID(用于转移功能) UpStatus *int `json:"upStatus"` // 上架状态 1-上架 5-下架 Tags []string `form:"tags" json:"tags" bson:"tags,omitempty"` FreeTime *int `json:"freeTime"` // 免费观影时长 DownloadAllow *int `json:"downloadAllow" bson:"downloadAllow"` // 允许下载的VIP级别,0表示不允许下载 1表示VIP 2表示免费 } // PassManyReq 视频批量审核参数 type PassManyReq struct { Infos []BatchEditInfo `json:"infos"` Pass int `json:"pass"` } // WebVideo 返回视频的基本信息 type WebVideo struct { ID primitive.ObjectID `json:"id" xlsx:"帖子ID"` // 帖子ID NewsType string `json:"newsType" xlsx:"-"` // 帖子类型, VID,视频帖子,COVER Publisher usermod.BaseInfo `json:"publisher" xlsx:"-"` // 帖子发布者ID PubliserID uint64 `json:"-" xlsx:"用户ID"` // 用户ID PublisherName string `json:"-" xlsx:"用户昵称"` // 用户昵称 Title string `json:"title" xlsx:"视频标题"` // 帖子标题 Content string `json:"content" bson:"content"` // 视频内容 Tags []TagInfo `json:"tags" xlsx:"-"` // 帖子标签列表 SourceID string `json:"sourceID" xlsx:"-"` // 帖子源站ID SourceURL string `json:"sourceURL" xlsx:"-"` // 帖子源站URL PreviewURL string `json:"previewURL" bson:"previewURL"` // 预览视频资源地址(并非所有视频都有预览) FileName string `json:"fileName" xlsx:"-"` // 文件名 PlayTime uint `json:"playTime" xlsx:"总时长"` // 视频播放时长 Status int `json:"status" xlsx:"-"` // 状态,0 未审核 1通过 2审核失败 3通过并认为免费 默认为0 Cover string `json:"cover" xlsx:"-"` // 视频封面 CoverThumb string `json:"coverThumb" xlsx:"-"` // 视频封面缩略图 SeriesCover []string `json:"seriesCover" xlsx:"-"` // 封面套图 IsUser bool `json:"isUser" xlsx:"-"` // TBD PlayCount int `json:"playCount" xlsx:"播放量(真)"` // 视频播放量(真) LikeCount int `json:"likeCount" xlsx:"点赞量(真)"` // 视频点赞量(真) CommentCount int `json:"commentCount" xlsx:"评论数(真)"` // 视频评论量(真) ShareCount int `json:"shareCount" xlsx:"-"` // 视频分享量(真) FakeLikeCount int `json:"fakeLikeCount" xlsx:"-"` // 点赞假数据 FakeCommentCount int `json:"fakeCommentCount" xlsx:"-"` // 评论假数据 FakeShareCount int `json:"fakeShareCount" xlsx:"-"` // 分享假数据 FakePlayCount int `json:"fakePlayCount" xlsx:"-"` // 播发假数据 LikeRate float64 `json:"likeRate" xlsx:"点赞率"` // 点赞率 Coins int64 `json:"coins" xlsx:"价格"` // 视频定价金币数 Resolution string `json:"resolution" xlsx:"-"` // 视频分辨率 FreeTime int `json:"freeTime" xlsx:"免费时长"` // 视频免费观看时长 Chosen bool `json:"chosen" xlsx:"-"` // 是否精选 FreeArea bool `json:"freeArea" xlsx:"-"` // 是否免费专区 Pushing bool `json:"pushing" xlsx:"-"` // 是否推送 Size int `json:"size" xlsx:"-"` // 文件大小 byte CreatedAt time.Time `json:"createdAt" xlsx:"上传时间"` // 创建时间 UpdatedAt time.Time `json:"updatedAt" xlsx:"更新时间"` // 更新时间 Reason string `json:"reason" xlsx:"-"` // 审核失败的理由 IsTopping bool `json:"isTopping" xlsx:"-"` // TBD IsRecommend bool `json:"isRecommend" xlsx:"-"` // 力荐 IsChoosen bool `json:"isChoosen" xlsx:"是否精选"` // 置精 IsMadou bool `json:"isMadou" xlsx:"-"` // 是否麻豆上传 RecoWeight int `json:"recoWeight" xlsx:"-"` // 推荐权重 -1,不可推荐 ReviewAccount string `json:"reviewAccount" xlsx:"-"` // 审核人 LinkUrl string `json:"linkUrl" xlsx:"-"` // TBD SortCode int `json:"sortCode" xlsx:"-"` // 排序号 目前只有广告帖子有用 TagSort []TagSort `json:"tagSort" xlsx:"-"` // 标签排序 Rewarded decimal.Decimal `json:"rewarded" xlsx:"-"` // 打赏 FakeRewarded decimal.Decimal `json:"fakeRewarded" xlsx:"-"` // (假)获得打赏 LiaoBaTop bool `json:"liaoBaTop" xlsx:"-"` // 是否撩吧置顶 LiaoBaTopSort int `json:"liaoBaTopSort" xlsx:"-"` // 撩吧置顶排序码 WorksSort int `json:"worksSort" xlsx:"-"` // TBD TotalSellDays float64 `json:"totalSellDays" xlsx:"售卖天数"` // 视频总的售卖天数: 从审核通过后开始计算 TotalSellCount int64 `json:"totalSellCount" xlsx:"售卖次数"` // 视频总的售卖次数 TotalSellAmount int64 `json:"totalSellAmount" xlsx:"售卖金币"` // 视频总的售卖金币数 PurchaseRate float64 `json:"purchaseRate" xlsx:"成交率"` // 视频成交率: 视频总的售卖次数 / 视频播放量 SectionID primitive.ObjectID `json:"sectionID" xlsx:"-"` // 视频所属专题ID SortCodeUnderSection int `json:"sortCodeUnderSection" xlsx:"-"` // 视频在某个专题下的排序 SectionName string `json:"sectionName" bson:"sectionName"` // 专题名称 ModuleName string `json:"moduleName" bson:"moduleName"` // 父专题名称 PageViewCount int64 `json:"pageViewCount" xlsx:"展现量"` // 视频页面展示次数 HitRate float64 `json:"hitRate" xlsx:"点击率"` // 视频点击率 = 页面展示次数 / 视频播放量 TagsExport string `json:"-" xlsx:"标签"` // 标签,仅用于导出 ActivityID primitive.ObjectID `json:"activityId" xlsx:"-"` // 参赛视频活动ID HappinessPlazaTop int32 `json:"happinessPlazaTop" xlsx:"-"` // 幸福广场置顶 ReviewAt time.Time `json:"reviewAt" xlsx:"-"` // 审核时间 ShareSort int `json:"shareSort" bson:"shareSort,omitempty"` // 分享视频列表排序. 出现在当用户分享视频时的推荐列表里. <=0时表示不推荐 SeedLinkUrl string `json:"seedLinkUrl" bson:"seedLinkUrl,omitempty"` // 种子链接 SeedSize uint64 `json:"seedSize" bson:"seedSize,omitempty"` // 种子影片大小 byte SeedPlayTime uint64 `json:"seedPlayTime" bson:"seedPlayTime,omitempty"` // 种子影片时长 RichText string `json:"richText" bson:"richText"` // 富文本内容 PreviewStart int `json:"previewStart" bson:"previewStart"` // 预览时间起始点 TimeNodeList []TimeNode `json:"timeNodeList" bson:"timeNodeList"` // 时间节点 DownloadAllow int `json:"downloadAllow" bson:"downloadAllow"` // 允许下载的VIP级别,0表示不允许下载 1表示VIP 2表示免费 ShowType int `json:"showType" bson:"showType"` // 0-所有的人都可以看 1-奇数可看 2-偶数可看 } type TagSort struct { TagId string `json:"tagId"` TagName string `json:"tagName"` SortCode int `json:"sortCode"` } // ListResp web 视频列表应答 type ListResp struct { VInfos []*WebVideo `json:"vInfos"` // 帖子列表 Total int64 `json:"total"` // 帖子总量 } // AwsPullResp 从AWS拉取视频响应体 type AwsPullResp struct { ID string `json:"id"` PublishID string `json:"publishID"` //视频上传ID CheckSum string `json:"checkSum"` Title string `json:"title"` Actors []string `json:"actors"` PlayTime uint `json:"playTime"` Tags []string `json:"tags"` Size int `json:"size"` Filename string `json:"filename"` Desc string `json:"desc"` FieldNameFs string `json:"fieldNameFs"` CoverImg []string `json:"coverImg"` Via string `json:"via"` Width int `json:"width"` Height int `json:"height"` Status string `json:"status"` Ratio float64 `json:"ratio"` } // AwsPullSeriesResp 从AWS拉取套图响应体 type AwsPullSeriesResp struct { ID string `json:"id"` Type string `json:"type"` //套图类型 SP 泡芙短视频套图 AV 泡芙长视频套图 Title string `json:"title"` // 标题 Tags []string `json:"tags"` // 标签 Desc string `json:"desc"` // 详细描述 CoverImg string `json:"coverImg"` // 封面 SeriesCover []string `json:"seriesCover"` // 套图 Number int64 `json:"number"` // 图片数量 Status string `json:"status"` // 当前状态 MimeType string `json:"mimeType"` // mime文件类型 Via string `json:"via"` // 来源 NewUpdateAt string `json:"newUpdateAt"` // q1需要要加 } // 从server-file 返回的发布者信息 type Publiser struct { UID string `json:"uid" bson:"uid" binding:"required"` //用户id UserName string `json:"name" bson:"name"` //昵称 Portrait string `json:"portrait" bson:"portrait"` //头像 Summary string `json:"summary" bson:"summary"` //简介 CreatedAt time.Time `json:"createdAt" bson:"createdAt"` UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` } // AwsResport 上传 type PublishResport struct { Code int `json:"code"` Msg string `json:"msg"` Data Publiser `json:"data"` } type Resport struct { Code stderr.Code `json:"code"` Msg string `json:"msg"` Data []AwsPullResp `json:"data"` } type PuFinfoResp struct { Code stderr.Code `json:"code"` Msg string `json:"msg"` Data AwsPullResp `json:"data"` } // 套图响应结果 type SeriesResport struct { Code stderr.Code `json:"code"` Msg string `json:"msg"` Data []AwsPullSeriesResp `json:"data"` } // OperateResult 更新或者删除的操作返回结果 type OperateResult struct { Count int64 `json:"count"` MergingCnt int64 `json:"mergingCnt"` //合并中的视频数 ConvertingCnt int64 `json:"convertingCnt"` //转码中的视频数 MerErrCnt int64 `json:"merErrCnt"` //合并失败视频 ConvertErrCnt int64 `json:"convertErrCnt"` //转码失败视频数 } // WebSubmitReq 视频发布请求 type WenUploadRes struct { PlayTime uint `json:"playTime" binding:"required"` Size int `json:"size"` Resolution string `json:"resolution"` MimeType string `json:"mimeType"` SourceID string `json:"sourceID" binding:"required"` SourceURL string `json:"sourceURL" binding:"required"` MD5 string `json:"md5"` Filename string `json:"filename"` } // AwsResport 上传 type AwsResport struct { Code int `json:"code"` Msg string `json:"msg"` Data AwsUploadResp `json:"data"` } // AwsUploadResp AwsUploadResp type AwsUploadResp struct { VID string `json:"id"` VideoURI string `json:"videoUri"` } type FsSendSingleResp struct { Code stderr.Code `json:"code"` Msg string `json:"msg"` Data FsSendSingleData `json:"data"` } // FsSendSingleData FsSendSingleData type FsSendSingleData struct { Domain string `json:"domain"` FileName string `json:"fileName"` } // FsSendSingleBatchResp FsSendSingleBatchResp type FsSendBatchResp struct { Code stderr.Code `json:"code"` Msg string `json:"msg"` Data FsSendBatchData `json:"data"` } // FsSendSingleData FsSendSingleData type FsSendBatchData struct { Batch []*FsSendSingleData `json:"batch"` } func (this *FsSendBatchData) GetFileNames() []string { names := []string{} for _, v := range this.Batch { names = append(names, v.FileName) } return names } func (this *FsSendBatchData) GetDomains() []string { domains := []string{} for _, v := range this.Batch { domains = append(domains, v.Domain) } return domains } func (this *FsSendBatchData) Count() int { return len(this.Batch) } // UpserVideoInfo 用于upsert video的 结构体 type UpserVideoInfo struct { Title string `json:"title" bson:"title,omitempty"` //视频标题 Tags []primitive.ObjectID `json:"tags" bson:"tags,omitempty"` //视频标签 SourceID string `json:"sourceID" bson:"sourceID,omitempty"` //视频在仓库中的资源ID SourceURL string `json:"sourceURL" bson:"sourceURL,omitempty"` //视频资源地址Path MimeType string `json:"mimeType" bson:"mimeType,omitempty"` //视频格式类型 Filename string `json:"fileName" bson:"fileName,omitempty"` //文件名称 PlayTime uint `json:"playTime" bson:"playTime,omitempty"` //影片长度 Cover string `json:"cover" bson:"cover,omitempty"` //封面大图 CoverThumb string `json:"coverThumb" bson:"coverThumb,omitempty"` //封⾯小图 SeriesCover []string `json:"seriesCover" bson:"seriesCover,omitempty"` //封面套图 Via string `json:"via" bson:"via,omitempty"` //来源 自拍,上传 Size int `json:"size" bson:"size,omitempty"` //文件大小 byte Resolution string `json:"resolution" bson:"resolution,omitempty"` //分辨率 Ratio float64 `json:"ratio" bson:"ratio,omitempty"` //宽高比 MD5 string `json:"md5" bson:"md5,omitempty"` //文件摘要 Actor string `json:"actor" bson:"actor,omitempty"` UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt,omitempty"` //刷新时间 } // TitleTime 视频标题时长数据 type TitleTime struct { Title string `json:"title"` PlayTime uint `json:"playTime"` } // WebVideoUpdateDoc 用于审核视频 同步信息 type WebVideoUpdateDoc struct { ID primitive.ObjectID `json:"id" bson:"_id,omitempty"` Cover *string `json:"cover,omitempty" bson:"cover,omitempty"` CoverThumb *string `json:"coverThumb,omitempty" bson:"coverThumb,omitempty"` SourceID *string `json:"sourceID,omitempty" bson:"sourceID,omitempty"` PlayTime *uint `json:"playTime,omitempty" bson:"playTime,omitempty"` FreeTime *int `json:"freeTime,omitempty" bson:"freeTime,omitempty"` SeriesCover *[]string `json:"seriesCover,omitempty" bson:"seriesCover,omitempty"` // 封面套图 VideoCover *[]string `json:"videoCover,omitempty" bson:"videoCover,omitempty"` // 视频截图 Resolution *string `json:"resolution,omitempty" bson:"resolution,omitempty"` Width *int `json:"width,omitempty" bson:"width,omitempty"` //视频宽度 Height *int `json:"height,omitempty" bson:"height,omitempty"` //视频高度 MD5 *string `json:"md5,omitempty" bson:"md5,omitempty" ` //文件摘要 Actor *string `json:"actor,omitempty" bson:"actor,omitempty"` Size *int `json:"size,omitempty" bson:"size,omitempty"` Filename *string `json:"fileName,omitempty" bson:"fileName,omitempty"` Via *string `json:"via,omitempty" bson:"via,omitempty"` Ratio *float64 `json:"ratio,omitempty" bson:"ratio,omitempty"` Quality *string `json:"quality,omitempty" bson:"quality,omitempty"` //视频质量 720P以上高质量-high 480-720P 中等质量-middle 其他为low Direction *string `json:"direction,omitempty" bson:"direction,omitempty"` //视频版式 vertical-竖屏 horizontal-横屏 square-方屏 } // SyncServerFileEdit 用户同步从server-file获取的基本信息 强制更新 type WebSyncServerFileEdit struct { PlayTime uint `json:"playTime" bson:"playTime"` //播放时长 Size int `json:"size" bson:"size"` //文件大小 byte Resolution string `json:"resolution" bson:"resolution"` //分辨率 Ratio float64 `json:"ratio" bson:"ratio"` //宽高比 MD5 string `json:"md5" bson:"md5"` //文件摘要 } type BatchUpdateRecoRequest struct { IDs []primitive.ObjectID `json:"ids"` // 帖子ID列表 Reco bool `json:"reco"` // 是否推荐 } type WebElasticSearchRequest struct { Keyword string `json:"keyword"` // 关键词 commod.Page } type WebElasticSearchResponse struct { List []ESVideo `json:"list"` // list HasNext bool `json:"hasNext"` // hasNext Total int `json:"total"` // total } // UploadMediaVideo 上传到媒资库的基础信息请求体 type UploadMediaVideo struct { FsResourceId string `json:"fs_resource_id"` // 文件资源id HashId string `json:"hash_id"` // 视频唯一id Title string `json:"title"` // 视频标题 CoverImage string `json:"cover_image"` // 封面图 M3u8Src string `json:"m3u8_src"` // m3u8地址 FileSize int `json:"file_size"` // 视频大小 Length int `json:"length"` // 视频时长 秒 Width int `json:"width"` // 宽度 Height int `json:"height"` // 高度 TagsText string `json:"tags_text"` // 视频标签,多个以逗号分割 } // BatchUpdateVidNewsTypeReq 批量更帖子类型参数 type BatchUpdateVidNewsTypeReq struct { Ids []primitive.ObjectID `form:"ids" json:"ids" bson:"ids"` // 帖子Id NewsType string `form:"newsType" json:"newsType" bson:"newsType,omitempty"` // 帖子类型 } // EditVideTagsReq 批量更视频参数 type EditVideTagsReq struct { Ids []string `form:"ids" json:"ids" bson:"ids"` // 视频ID Tags []string `form:"tags" json:"tags" bson:"tags,omitempty"` // 标签 Overwrite bool `form:"overwrite" json:"overwrite"` // 是否覆盖 }