66 lines
2.7 KiB
Go
66 lines
2.7 KiB
Go
package dto
|
|
|
|
import (
|
|
"rag/common/task"
|
|
)
|
|
|
|
// WriteTaskProgressReq 写入任务进度请求
|
|
type WriteTaskProgressReq struct {
|
|
TaskType task.TaskType `json:"taskType" dc:"任务类型"`
|
|
Status task.TaskStatus `json:"status" dc:"任务状态"`
|
|
TaskId int64 `json:"taskId" dc:"任务ID"`
|
|
Remark string `json:"remark" dc:"备注"`
|
|
}
|
|
|
|
// CreateTaskReq 创建任务请求
|
|
type CreateTaskReq struct {
|
|
TaskType task.TaskType `json:"taskType" dc:"任务类型"`
|
|
Status task.TaskStatus `json:"status" dc:"任务状态"`
|
|
TaskId int64 `json:"taskId" dc:"任务ID"`
|
|
Remark string `json:"remark" dc:"备注"`
|
|
}
|
|
|
|
// UpdateTaskReq 更新任务请求
|
|
type UpdateTaskReq struct {
|
|
Id int64 `json:"id" dc:"任务ID"`
|
|
TaskId int64 `json:"taskId" dc:"任务ID"`
|
|
Status task.TaskStatus `json:"status" dc:"任务状态"`
|
|
Remark string `json:"remark" dc:"备注"`
|
|
}
|
|
|
|
// DeleteTaskByTaskIdReq 删除任务请求
|
|
type DeleteTaskByTaskIdReq struct {
|
|
TaskId int64 `json:"taskId" v:"required#任务id不能为空"`
|
|
}
|
|
|
|
// GetTaskReq 获取任务请求
|
|
type GetTaskReq struct {
|
|
Id int64 `json:"id" dc:"任务ID"`
|
|
TaskId int64 `json:"taskId" dc:"任务ID"`
|
|
TaskType task.TaskType `json:"taskType" dc:"任务类型"`
|
|
}
|
|
|
|
// TaskVO 任务视图对象
|
|
type TaskVO struct {
|
|
Id int64 `json:"id" dc:"任务ID"`
|
|
TaskType task.TaskType `json:"taskType" dc:"任务类型"`
|
|
Status task.TaskStatus `json:"status" dc:"任务状态"`
|
|
Priority task.TaskPriority `json:"priority" dc:"任务优先级"`
|
|
ParentTaskID int64 `json:"parentTaskId" dc:"父任务ID"`
|
|
TotalItems int64 `json:"totalItems" dc:"总项数"`
|
|
ProcessedItems int64 `json:"processedItems" dc:"已处理项数"`
|
|
Progress float64 `json:"progress" dc:"进度百分比"`
|
|
StartTime *int64 `json:"startTime" dc:"开始时间戳"`
|
|
EndTime *int64 `json:"endTime" dc:"结束时间戳"`
|
|
Duration int64 `json:"duration" dc:"耗时(毫秒)"`
|
|
SuccessCount int64 `json:"successCount" dc:"成功数"`
|
|
FailCount int64 `json:"failCount" dc:"失败数"`
|
|
Executor string `json:"executor" dc:"执行器"`
|
|
DocumentID int64 `json:"documentId" dc:"文档ID"`
|
|
Remark string `json:"remark" dc:"备注"`
|
|
Creator string `json:"creator" dc:"创建人"`
|
|
CreatedAt int64 `json:"createdAt" dc:"创建时间"`
|
|
Updater string `json:"updater" dc:"更新人"`
|
|
UpdatedAt int64 `json:"updatedAt" dc:"更新时间"`
|
|
}
|