This commit is contained in:
2026-08-16 09:02:39 +08:00
parent c554152f4f
commit f7f6db8695
105 changed files with 2535 additions and 948 deletions
+20 -4
View File
@@ -23,18 +23,33 @@ type TaskRequest struct {
}
type DeleteTaskRequest struct {
ID uint `json:"ID"`
ID uint `json:"ID" binding:"required"`
}
type ToggleTaskRequest struct {
ID uint `json:"ID"`
ID uint `json:"ID" binding:"required"`
Enabled bool `json:"enabled"`
}
type TaskListRequest struct {
Page int `form:"page"`
PageSize int `form:"pageSize"`
Name string `form:"name"`
ExecutorType string `form:"executorType"`
Enabled *bool `form:"enabled"`
}
type TaskLogListRequest struct {
Page int `form:"page"`
PageSize int `form:"pageSize"`
TaskID uint `form:"taskId"`
Status string `form:"status"`
}
type TaskResponse struct {
ID uint `json:"ID"`
CreatedAt time.Time `json:"CreatedAt"`
UpdatedAt time.Time `json:"UpdatedAt"`
DeletedAt any `json:"DeletedAt"`
DeletedAt any `json:"-"`
Name string `json:"name"`
Description string `json:"description"`
Spec string `json:"spec"`
@@ -54,7 +69,8 @@ type TaskResponse struct {
type TaskLogResponse struct {
ID uint `json:"ID"`
CreatedAt time.Time `json:"CreatedAt"`
DeletedAt any `json:"DeletedAt"`
UpdatedAt time.Time `json:"UpdatedAt"`
DeletedAt any `json:"-"`
TaskID uint `json:"taskId"`
TaskName string `json:"taskName"`
TriggerType string `json:"triggerType"`