service/dbstruct/video_moderation.go

158 lines
4.9 KiB
Go
Raw Permalink Normal View History

2024-04-26 10:46:37 +08:00
package dbstruct
type VideoModeration struct {
Id *string `json:"id" bson:"_id"` // 图像审核表id
AuditedMedia *MediaComponent `json:"audited_media" bson:"audited_media"` // 待审核媒体内容(图像)
BatchId *string `json:"batch_id" bson:"batch_id"` // 批次号
Status *int64 `json:"status" bson:"status"` // 审核状态
FrameNum *int32 `json:"frame_num" bson:"frame_num"` // 截帧数
FrameSummaries *[]*FrameSummary `json:"frame_summaries" bson:"frame_summaries"` // 视频截帧信息汇总
FrameDetails *[]*FrameDetail `json:"frame_details" bson:"frame_details"` // 视频截帧详细信息
AudioSummaries *[]*AudioSummary `json:"audio_summaries" bson:"audio_summaries"` // 视频音频信息汇总
AudioDetails *[]*AudioDetail `json:"audio_details" bson:"audio_details"` // 视频音频详细信息
Remarks *string `json:"remarks" bson:"remarks"` // 备注
Ct *int64 `json:"ct" bson:"ct"` // 创建时间
Ut *int64 `json:"ut" bson:"ut"` // 更新时间
DelFlag *int64 `json:"del_flag" bson:"del_flag"` // 删除标记
Description string
}
type FrameSummary struct {
Label *string `json:"label" bson:"label"`
LabelSum *int32 `json:"labelsum" bson:"labelsum"`
}
type FrameDetail struct {
Offset *float32 `json:"offset" bson:"offset"`
FrameServiceDetails *[]*FrameServiceDetail `json:"frame_service_details" bson:"frame_service_details"`
}
type FrameServiceDetail struct {
FrameLabelDetails *[]*FrameLabelDetail `json:"frame_label_details" bson:"frame_label_details"`
Service *string `json:"service" xml:"service"`
}
type FrameLabelDetail struct {
Confidence *float32 `json:"confidence" bson:"confidence"`
Label *string `json:"label" bson:"label"`
}
type AudioSummary struct {
Label *string `json:"label" bson:"label"`
LabelSum *int32 `json:"labelsum" bson:"labelsum"`
}
type AudioDetail struct {
EndTime *int64 `json:"end_time" xml:"end_time"`
EndTimestamp *int64 `json:"end_timestamp" xml:"end_timestamp"`
Extend *string `json:"extend" xml:"extend"`
Labels *string `json:"labels" xml:"labels"`
RiskTips *string `json:"risk_tips" xml:"risk_tips"`
RiskWords *string `json:"risk_words" xml:"risk_words"`
Score *float32 `json:"score" xml:"score"`
StartTime *int64 `json:"start_time" xml:"start_time"`
StartTimestamp *int64 `json:"start_timestamp" xml:"start_timestamp"`
Text *string `json:"text" xml:"text"`
}
func (p *VideoModeration) GetId() string {
if p == nil || p.Id == nil {
return ""
}
return *p.Id
}
func (p *VideoModeration) GetBatchId() string {
if p == nil || p.BatchId == nil {
return ""
}
return *p.BatchId
}
2024-04-27 00:18:31 +08:00
func (p *VideoModeration) GetStatus() int64 {
if p == nil || p.Status == nil {
return 0
}
return *p.Status
}
func (p *VideoModeration) GetRemarks() string {
if p == nil || p.Remarks == nil {
return ""
}
return *p.Remarks
}
2024-04-26 10:46:37 +08:00
func (p *VideoModeration) GetFrameSummaries() []*FrameSummary {
if p == nil || p.FrameSummaries == nil {
return make([]*FrameSummary, 0)
}
return *p.FrameSummaries
}
func (p *VideoModeration) GetAudioSummaries() []*AudioSummary {
if p == nil || p.AudioSummaries == nil {
return make([]*AudioSummary, 0)
}
return *p.AudioSummaries
}
func (p *FrameSummary) GetLabel() string {
if p == nil || p.Label == nil {
return ""
}
return *p.Label
}
func (p *FrameSummary) GetLabelSum() int32 {
if p == nil || p.LabelSum == nil {
return 0
}
return *p.LabelSum
}
func (p *AudioSummary) GetLabel() string {
if p == nil || p.Label == nil {
return ""
}
return *p.Label
}
func (p *AudioSummary) GetLabelSum() int32 {
if p == nil || p.LabelSum == nil {
return 0
}
return *p.LabelSum
}
func (p *VideoModeration) SetFrameSummaries(frameSummaries []*FrameSummary) *VideoModeration {
p.FrameSummaries = &frameSummaries
return p
}
func (p *VideoModeration) SetFrameDetails(frameDetails []*FrameDetail) *VideoModeration {
p.FrameDetails = &frameDetails
return p
}
func (p *VideoModeration) SetAudioSummaries(audioSummaries []*AudioSummary) *VideoModeration {
p.AudioSummaries = &audioSummaries
return p
}
func (p *VideoModeration) SetAudioDetails(audioDetails []*AudioDetail) *VideoModeration {
p.AudioDetails = &audioDetails
return p
}
func (p *FrameDetail) SetFrameServiceDetails(frameServiceDetails []*FrameServiceDetail) *FrameDetail {
p.FrameServiceDetails = &frameServiceDetails
return p
}
func (p *FrameServiceDetail) SetFrameLabelDetails(frameLabelDetails []*FrameLabelDetail) *FrameServiceDetail {
p.FrameLabelDetails = &frameLabelDetails
return p
}