优化
This commit is contained in:
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user