Files
zmkgC/api/v1/system/todo_tasks.go
2025-07-07 20:11:59 +08:00

115 lines
4.2 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// ==========================================================================
// GFast自动生成api操作代码。
// 生成日期2024-05-15 17:30:14
// 生成路径: api/v1/system/todo_tasks.go
// 生成人gfast
// desc:App-待办相关参数
// company:云南奇讯科技有限公司
// ==========================================================================
package system
import (
"github.com/gogf/gf/v2/frame/g"
commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
"github.com/tiger1103/gfast/v3/internal/app/system/model"
)
// TodoTasksSearchReq 分页请求参数
type TodoTasksSearchReq struct {
g.Meta `path:"/list" tags:"App-待办" method:"get" summary:"App-待办列表"`
Id string `p:"id"` //
MissingCardTime string `p:"missingCardTime"` // 缺卡时间
Applicant string `p:"applicant" v:"applicant@integer#申请人需为整数"` // 申请人
ProjectId string `p:"projectId" v:"projectId@integer#项目ID需为整数"` // 项目ID
TaskType string `p:"taskType" v:"taskType@integer#0 补卡提醒 | 1 考勤审批需为整数"` // 0 补卡提醒 | 1 考勤审批
OrderId string `p:"orderId" v:"orderId@integer#对应跳转的主键ID需为整数"` // 对应跳转的主键ID
CreatedAt string `p:"createdAt" v:"createdAt@datetime#需为YYYY-MM-DD hh:mm:ss格式"` //
UserId string `p:"userId" v:"userId@integer#用户ID需为整数"` // 用户ID
commonApi.PageReq
commonApi.Author
}
// TodoTasksSearchRes 列表返回结果
type TodoTasksSearchRes struct {
g.Meta `mime:"application/json"`
commonApi.ListRes
List []*model.TodoTasksListRes `json:"list"`
}
// 获取自己的待办列表
type TodoTasksMyListReq struct {
g.Meta `path:"/todoList" tags:"App-待办" method:"get" summary:"获取自己的待办列表"`
commonApi.Author
commonApi.PageReq
ProjectId int `p:"projectId" v:"projectId@integer#项目ID需为整数"` // 项目ID
Role string `p:"role" dc:"0 管理员 | 1 施工人员"` // // 角色
Status int `p:"status" v:"status@integer#状态" dc:"0 未处理 | 1 已处理 | 2 所有"`
}
type TodoTasksMyListRes struct {
g.Meta `mime:"application/json"`
commonApi.ListRes
List []*model.TodoTasksListRes `json:"list"`
}
// TodoTasksAddReq 添加操作请求参数
type TodoTasksAddReq struct {
g.Meta `path:"/add" tags:"App-待办" method:"post" summary:"App-待办添加"`
commonApi.Author
MissingCardTime string `p:"missingCardTime" `
Applicant int `p:"applicant" `
ProjectId int `p:"projectId" `
TaskType int `p:"taskType" `
OrderId int `p:"orderId" `
UserId int `p:"userId" `
}
// TodoTasksAddRes 添加操作返回结果
type TodoTasksAddRes struct {
commonApi.EmptyRes
}
// TodoTasksEditReq 修改操作请求参数
type TodoTasksEditReq struct {
g.Meta `path:"/edit" tags:"App-待办" method:"put" summary:"App-待办修改"`
commonApi.Author
Id uint `p:"id" v:"required#主键ID不能为空"`
MissingCardTime string `p:"missingCardTime" `
Applicant int `p:"applicant" `
ProjectId int `p:"projectId" `
TaskType int `p:"taskType" `
OrderId int `p:"orderId" `
UserId int `p:"userId" `
}
// TodoTasksEditRes 修改操作返回结果
type TodoTasksEditRes struct {
commonApi.EmptyRes
}
// TodoTasksGetReq 获取一条数据请求
type TodoTasksGetReq struct {
g.Meta `path:"/get" tags:"App-待办" method:"get" summary:"获取App-待办信息"`
commonApi.Author
Id uint `p:"id" v:"required#主键必须"` // 通过主键获取
}
// TodoTasksGetRes 获取一条数据结果
type TodoTasksGetRes struct {
g.Meta `mime:"application/json"`
*model.TodoTasksInfoRes
}
// TodoTasksDeleteReq 删除数据请求
type TodoTasksDeleteReq struct {
g.Meta `path:"/delete" tags:"App-待办" method:"delete" summary:"删除App-待办"`
commonApi.Author
Ids []uint `p:"ids" v:"required#主键必须"` // 通过主键删除
}
// TodoTasksDeleteRes 删除数据返回
type TodoTasksDeleteRes struct {
commonApi.EmptyRes
}