1、文档规范化
2、增加cid核心功能entity
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
package material
|
||||
|
||||
import (
|
||||
"gitea.redpowerfuture.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
// Material 素材实体(素材文件库,md5去重)
|
||||
type Material struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
AdvertiserID int64 `orm:"advertiser_id" json:"advertiserId" description:"广告主ID"`
|
||||
Type string `orm:"type" json:"type" description:"素材类型 image/video/text"`
|
||||
Title string `orm:"title" json:"title" description:"素材标题"`
|
||||
FilePath string `orm:"file_path" json:"filePath" description:"本地存储路径"`
|
||||
FileSize int64 `orm:"file_size" json:"fileSize" description:"文件大小(字节)"`
|
||||
MD5 string `orm:"md5" json:"md5" description:"文件MD5(去重键)"`
|
||||
Width int `orm:"width" json:"width" description:"宽度(像素)"`
|
||||
Height int `orm:"height" json:"height" description:"高度(像素)"`
|
||||
Duration int `orm:"duration" json:"duration" description:"视频时长(秒)"`
|
||||
Format string `orm:"format" json:"format" description:"文件格式"`
|
||||
AuditStatus string `orm:"audit_status" json:"auditStatus" description:"审核状态 pending/auditing/pass/reject/disabled"`
|
||||
Status int `orm:"status" json:"status" description:"状态 1可用 0禁用"`
|
||||
Extra string `orm:"extra" json:"extra" description:"扩展(JSON) 如平台素材ID映射"`
|
||||
}
|
||||
|
||||
// MaterialCol 素材表字段定义
|
||||
type MaterialCol struct {
|
||||
beans.SQLBaseCol
|
||||
AdvertiserID string
|
||||
Type string
|
||||
Title string
|
||||
FilePath string
|
||||
FileSize string
|
||||
MD5 string
|
||||
Width string
|
||||
Height string
|
||||
Duration string
|
||||
Format string
|
||||
AuditStatus string
|
||||
Status string
|
||||
Extra string
|
||||
}
|
||||
|
||||
// MaterialCols 素材表字段常量
|
||||
var MaterialCols = MaterialCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
AdvertiserID: "advertiser_id",
|
||||
Type: "type",
|
||||
Title: "title",
|
||||
FilePath: "file_path",
|
||||
FileSize: "file_size",
|
||||
MD5: "md5",
|
||||
Width: "width",
|
||||
Height: "height",
|
||||
Duration: "duration",
|
||||
Format: "format",
|
||||
AuditStatus: "audit_status",
|
||||
Status: "status",
|
||||
Extra: "extra",
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package material
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
|
||||
"gitea.redpowerfuture.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
// MaterialAudit 素材审核记录实体(审核状态机全量日志,多通道)
|
||||
type MaterialAudit struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
MaterialID int64 `orm:"material_id" json:"materialId" description:"素材ID"`
|
||||
AuditChannel string `orm:"audit_channel" json:"auditChannel" description:"审核通道 yidun/platform/manual"`
|
||||
AuditAction string `orm:"audit_action" json:"auditAction" description:"审核动作 submit/pass/reject/revoke"`
|
||||
AuditStatus string `orm:"audit_status" json:"auditStatus" description:"审核状态"`
|
||||
Result string `orm:"result" json:"result" description:"平台返回详情(JSON) 原因/违规项"`
|
||||
Operator string `orm:"operator" json:"operator" description:"操作人"`
|
||||
AuditTime *gtime.Time `orm:"audit_time" json:"auditTime" description:"审核时间"`
|
||||
}
|
||||
|
||||
// MaterialAuditCol 素材审核记录表字段定义
|
||||
type MaterialAuditCol struct {
|
||||
beans.SQLBaseCol
|
||||
MaterialID string
|
||||
AuditChannel string
|
||||
AuditAction string
|
||||
AuditStatus string
|
||||
Result string
|
||||
Operator string
|
||||
AuditTime string
|
||||
}
|
||||
|
||||
// MaterialAuditCols 素材审核记录表字段常量
|
||||
var MaterialAuditCols = MaterialAuditCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
MaterialID: "material_id",
|
||||
AuditChannel: "audit_channel",
|
||||
AuditAction: "audit_action",
|
||||
AuditStatus: "audit_status",
|
||||
Result: "result",
|
||||
Operator: "operator",
|
||||
AuditTime: "audit_time",
|
||||
}
|
||||
Reference in New Issue
Block a user