save task origin info for AI generating jobs

This commit is contained in:
RockYang
2024-11-11 17:22:08 +08:00
parent 95a071014c
commit c39814ce2b
31 changed files with 358 additions and 136 deletions

View File

@@ -6,6 +6,7 @@ type DallJob struct {
Id uint `gorm:"primarykey;column:id"`
UserId uint
Prompt string
TaskInfo string // 原始任务信息
ImgURL string
OrgURL string
Publish bool

View File

@@ -7,6 +7,7 @@ type MidJourneyJob struct {
Type string
UserId int
TaskId string
TaskInfo string // 原始任务信息
ChannelId string
MessageId string
ReferenceId string

View File

@@ -9,6 +9,7 @@ type SunoJob struct {
Title string
Type int
TaskId string
TaskInfo string // 原始任务信息
RefTaskId string // 续写的任务id
Tags string // 歌曲风格和标签
Instrumental bool // 是否生成纯音乐

View File

@@ -8,6 +8,7 @@ type VideoJob struct {
Channel string // 频道
Type string // luma,runway,cog
TaskId string
TaskInfo string // 原始任务信息
Prompt string // 提示词
PromptExt string // 优化后提示词
CoverURL string // 封面图 URL
@@ -18,7 +19,6 @@ type VideoJob struct {
ErrMsg string // 错误信息
RawData string // 原始数据 json
Power int // 消耗算力
Params string // 任务参数
CreatedAt time.Time
}

View File

@@ -1,7 +1,5 @@
package vo
import "geekai/core/types"
type VideoJob struct {
Id uint `json:"id"`
UserId int `json:"user_id"`
@@ -18,6 +16,5 @@ type VideoJob struct {
ErrMsg string `json:"err_msg"` // 错误信息
RawData map[string]interface{} `json:"raw_data"` // 原始数据 json
Power int `json:"power"` // 消耗算力
Params types.VideoParams `json:"params"` // 任务参数
CreatedAt int64 `json:"created_at"`
}