29 lines
844 B
Go
29 lines
844 B
Go
|
package videomoderation
|
||
|
|
||
|
// 图像审核动作,由定时任务间隔内对同一数据库-表-单个元素-某字段产生的审核任务的操作构成
|
||
|
type VideoModerationAction struct {
|
||
|
// 静态元素
|
||
|
TaskNum int // 任务数量
|
||
|
TaskChain []*VideoModerationTaskControlBlock // 任务链
|
||
|
|
||
|
// 动态元素
|
||
|
AuditedTaskNum int // 已完成审核的任务数量
|
||
|
}
|
||
|
|
||
|
func NewVideoModerationAction() *VideoModerationAction {
|
||
|
return &VideoModerationAction{
|
||
|
TaskNum: 0,
|
||
|
TaskChain: make([]*VideoModerationTaskControlBlock, 0),
|
||
|
AuditedTaskNum: 0,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (s *VideoModerationAction) Record(tcb *VideoModerationTaskControlBlock) {
|
||
|
s.TaskChain = append(s.TaskChain, tcb)
|
||
|
s.TaskNum++
|
||
|
}
|
||
|
|
||
|
func (s *VideoModerationAction) IsPassed() bool {
|
||
|
return s.TaskChain[len(s.TaskChain)-1].IsTaskPassed
|
||
|
}
|