|
@@ -46,6 +46,7 @@ type Task struct {
|
|
|
TaskID string `json:"task_id" gorm:"type:varchar(191);index"` // 第三方id,不一定有/ song id\ Task id
|
|
TaskID string `json:"task_id" gorm:"type:varchar(191);index"` // 第三方id,不一定有/ song id\ Task id
|
|
|
Platform constant.TaskPlatform `json:"platform" gorm:"type:varchar(30);index"` // 平台
|
|
Platform constant.TaskPlatform `json:"platform" gorm:"type:varchar(30);index"` // 平台
|
|
|
UserId int `json:"user_id" gorm:"index"`
|
|
UserId int `json:"user_id" gorm:"index"`
|
|
|
|
|
+ Group string `json:"group" gorm:"type:varchar(50)"` // 修正计费用
|
|
|
ChannelId int `json:"channel_id" gorm:"index"`
|
|
ChannelId int `json:"channel_id" gorm:"index"`
|
|
|
Quota int `json:"quota"`
|
|
Quota int `json:"quota"`
|
|
|
Action string `json:"action" gorm:"type:varchar(40);index"` // 任务类型, song, lyrics, description-mode
|
|
Action string `json:"action" gorm:"type:varchar(40);index"` // 任务类型, song, lyrics, description-mode
|
|
@@ -99,6 +100,7 @@ type SyncTaskQueryParams struct {
|
|
|
func InitTask(platform constant.TaskPlatform, relayInfo *commonRelay.RelayInfo) *Task {
|
|
func InitTask(platform constant.TaskPlatform, relayInfo *commonRelay.RelayInfo) *Task {
|
|
|
t := &Task{
|
|
t := &Task{
|
|
|
UserId: relayInfo.UserId,
|
|
UserId: relayInfo.UserId,
|
|
|
|
|
+ Group: relayInfo.UsingGroup,
|
|
|
SubmitTime: time.Now().Unix(),
|
|
SubmitTime: time.Now().Unix(),
|
|
|
Status: TaskStatusNotStart,
|
|
Status: TaskStatusNotStart,
|
|
|
Progress: "0%",
|
|
Progress: "0%",
|