优化
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package dto
|
||||
|
||||
import "encoding/json"
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
type TaskRequest struct {
|
||||
ID uint `json:"ID"`
|
||||
@@ -26,3 +29,44 @@ type ToggleTaskRequest struct {
|
||||
ID uint `json:"ID"`
|
||||
Enabled bool `json:"enabled"`
|
||||
}
|
||||
|
||||
type TaskResponse struct {
|
||||
ID uint `json:"ID"`
|
||||
CreatedAt time.Time `json:"CreatedAt"`
|
||||
UpdatedAt time.Time `json:"UpdatedAt"`
|
||||
DeletedAt any `json:"DeletedAt"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Spec string `json:"spec"`
|
||||
WithSeconds bool `json:"withSeconds"`
|
||||
ExecutorType string `json:"executorType"`
|
||||
MethodName string `json:"methodName"`
|
||||
Params json.RawMessage `json:"params"`
|
||||
HTTPURL string `json:"httpUrl"`
|
||||
HTTPMethod string `json:"httpMethod"`
|
||||
HTTPHeader json.RawMessage `json:"httpHeader"`
|
||||
HTTPBody string `json:"httpBody"`
|
||||
HTTPAllowPrivate bool `json:"httpAllowPrivate"`
|
||||
Enabled bool `json:"enabled"`
|
||||
NextRunAt *time.Time `json:"nextRunAt"`
|
||||
}
|
||||
|
||||
type TaskLogResponse struct {
|
||||
ID uint `json:"ID"`
|
||||
CreatedAt time.Time `json:"CreatedAt"`
|
||||
DeletedAt any `json:"DeletedAt"`
|
||||
TaskID uint `json:"taskId"`
|
||||
TaskName string `json:"taskName"`
|
||||
TriggerType string `json:"triggerType"`
|
||||
StartedAt time.Time `json:"startedAt"`
|
||||
FinishedAt time.Time `json:"finishedAt"`
|
||||
DurationMS int64 `json:"durationMs"`
|
||||
Status string `json:"status"`
|
||||
ErrorMsg string `json:"errorMsg"`
|
||||
Output string `json:"output"`
|
||||
}
|
||||
|
||||
type TaskMethodResponse struct {
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user