生成视频并且上传到minio-异步

This commit is contained in:
2026-05-22 13:18:55 +08:00
parent 9a40fd7e1e
commit 036b5cec37
6 changed files with 579 additions and 4 deletions

View File

@@ -0,0 +1,48 @@
package video
import "gitea.com/red-future/common/beans"
// ConcatTask 视频拼接异步任务实体
type ConcatTask struct {
beans.SQLBaseDO `orm:",inherit"`
TaskID string `orm:"task_id" json:"taskId" description:"任务唯一标识"`
Status string `orm:"status" json:"status" description:"任务状态:pending/running/success/failed"`
FileURL string `orm:"file_url" json:"fileUrl" description:"MinIO文件访问路径"`
FileSize int64 `orm:"file_size" json:"fileSize" description:"文件大小(字节)"`
FileName string `orm:"file_name" json:"fileName" description:"文件名"`
FileFormat string `orm:"file_format" json:"fileFormat" description:"文件格式"`
FileAddressPrefix string `orm:"file_address_prefix" json:"fileAddressPrefix" description:"MinIO地址前缀"`
MethodUsed string `orm:"method_used" json:"methodUsed" description:"实际使用的拼接方式"`
DurationStr string `orm:"duration_str" json:"durationStr" description:"拼接后时长"`
ErrorMessage string `orm:"error_message" json:"errorMessage" description:"错误信息"`
}
// ConcatTaskCol 字段定义
type ConcatTaskCol struct {
beans.SQLBaseCol
TaskID string
Status string
FileURL string
FileSize string
FileName string
FileFormat string
FileAddressPrefix string
MethodUsed string
DurationStr string
ErrorMessage string
}
// ConcatTaskCols 字段常量
var ConcatTaskCols = ConcatTaskCol{
SQLBaseCol: beans.DefSQLBaseCol,
TaskID: "task_id",
Status: "status",
FileURL: "file_url",
FileSize: "file_size",
FileName: "file_name",
FileFormat: "file_format",
FileAddressPrefix: "file_address_prefix",
MethodUsed: "method_used",
DurationStr: "duration_str",
ErrorMessage: "error_message",
}