mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-10-15 22:43:45 +08:00
This commit is contained in:
@@ -3,24 +3,18 @@
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package cron
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
"hotgo/internal/model/input/sysin"
|
||||
)
|
||||
|
||||
// ListReq 查询列表
|
||||
type ListReq struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
Title string `json:"title"`
|
||||
Content string `json:"content"`
|
||||
g.Meta `path:"/cron/list" method:"get" tags:"定时任务" summary:"获取定时任务列表"`
|
||||
g.Meta `path:"/cron/list" method:"get" tags:"定时任务" summary:"获取定时任务列表"`
|
||||
sysin.CronListInp
|
||||
}
|
||||
|
||||
type ListRes struct {
|
||||
@@ -30,8 +24,8 @@ type ListRes struct {
|
||||
|
||||
// ViewReq 获取信息
|
||||
type ViewReq struct {
|
||||
Id int64 `json:"id" v:"required#定时任务ID不能为空" dc:"定时任务ID"`
|
||||
g.Meta `path:"/cron/view" method:"get" tags:"定时任务" summary:"获取指定信息"`
|
||||
sysin.CronViewInp
|
||||
}
|
||||
type ViewRes struct {
|
||||
*sysin.CronViewModel
|
||||
@@ -39,37 +33,45 @@ type ViewRes struct {
|
||||
|
||||
// EditReq 修改/新增
|
||||
type EditReq struct {
|
||||
entity.SysCron
|
||||
g.Meta `path:"/cron/edit" method:"post" tags:"定时任务" summary:"修改/新增定时任务"`
|
||||
sysin.CronEditInp
|
||||
}
|
||||
type EditRes struct {
|
||||
*sysin.CronEditModel
|
||||
}
|
||||
type EditRes struct{}
|
||||
|
||||
// DeleteReq 删除
|
||||
type DeleteReq struct {
|
||||
Id interface{} `json:"id" v:"required#定时任务ID不能为空" dc:"定时任务ID"`
|
||||
g.Meta `path:"/cron/delete" method:"post" tags:"定时任务" summary:"删除定时任务"`
|
||||
sysin.CronDeleteInp
|
||||
}
|
||||
type DeleteRes struct {
|
||||
*sysin.CronDeleteModel
|
||||
}
|
||||
type DeleteRes struct{}
|
||||
|
||||
// MaxSortReq 最大排序
|
||||
type MaxSortReq struct {
|
||||
Id int64 `json:"id" dc:"定时任务ID"`
|
||||
g.Meta `path:"/cron/maxSort" method:"get" tags:"定时任务" summary:"定时任务最大排序"`
|
||||
sysin.CronMaxSortInp
|
||||
}
|
||||
type MaxSortRes struct {
|
||||
Sort int `json:"sort" dc:"排序"`
|
||||
*sysin.CronMaxSortModel
|
||||
}
|
||||
|
||||
// StatusReq 更新状态
|
||||
type StatusReq struct {
|
||||
entity.SysCron
|
||||
g.Meta `path:"/cron/status" method:"post" tags:"定时任务" summary:"更新定时任务状态"`
|
||||
sysin.CronStatusInp
|
||||
}
|
||||
type StatusRes struct {
|
||||
*sysin.CronStatusModel
|
||||
}
|
||||
type StatusRes struct{}
|
||||
|
||||
// OnlineExecReq 在线执行
|
||||
type OnlineExecReq struct {
|
||||
g.Meta `path:"/cron/onlineExec" method:"post" tags:"定时任务" summary:"在线执行"`
|
||||
sysin.OnlineExecInp
|
||||
}
|
||||
type OnlineExecRes struct{}
|
||||
type OnlineExecRes struct {
|
||||
*sysin.OnlineExecModel
|
||||
}
|
||||
|
Reference in New Issue
Block a user