Files
zmkgC/api/v1/system/reminders.go

97 lines
3.6 KiB
Go
Raw Normal View History

2025-07-07 20:11:59 +08:00
// ==========================================================================
// GFast自动生成api操作代码。
// 生成日期2024-05-14 14:55:52
// 生成路径: api/v1/system/reminders.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"
)
// RemindersSearchReq 分页请求参数
type RemindersSearchReq struct {
g.Meta `path:"/list" tags:"App-消息-提醒" method:"get" summary:"App-消息-提醒列表"`
Id string `p:"id"` //
UserId string `p:"userId" v:"userId@integer#消息接收者ID需为整数"` // 消息接收者ID
ReminderType string `p:"reminderType" v:"reminderType@integer#提醒类型 0 安全整改 | 1 质量整改 | 2 AI | 3 打卡需为整数"` // 提醒类型 0 安全整改 | 1 质量整改 | 2 AI | 3 打卡
Title string `p:"title"` // 标题
ViolationType string `p:"violationType"` // 违章类型
ProjectId string `p:"projectId" v:"projectId@integer#项目ID需为整数"` // 项目ID
CreatedAt string `p:"createdAt" v:"createdAt@datetime#需为YYYY-MM-DD hh:mm:ss格式"` //
OpenId string `p:"openId"`
commonApi.PageReq
commonApi.Author
}
// RemindersSearchRes 列表返回结果
type RemindersSearchRes struct {
g.Meta `mime:"application/json"`
commonApi.ListRes
List []*model.RemindersListRes `json:"list"`
}
// RemindersAddReq 添加操作请求参数
type RemindersAddReq struct {
g.Meta `path:"/add" tags:"App-消息-提醒" method:"post" summary:"App-消息-提醒添加"`
commonApi.Author
UserId int `p:"userId" `
ReminderType int `p:"reminderType" `
Title string `p:"title" `
ViolationType string `p:"violationType" `
ProjectId int `p:"projectId" `
}
// RemindersAddRes 添加操作返回结果
type RemindersAddRes struct {
commonApi.EmptyRes
}
// RemindersEditReq 修改操作请求参数
type RemindersEditReq struct {
g.Meta `path:"/edit" tags:"App-消息-提醒" method:"put" summary:"App-消息-提醒修改"`
commonApi.Author
Id uint `p:"id" v:"required#主键ID不能为空"`
UserId int `p:"userId" `
ReminderType int `p:"reminderType" `
Title string `p:"title" `
ViolationType string `p:"violationType" `
ProjectId int `p:"projectId" `
}
// RemindersEditRes 修改操作返回结果
type RemindersEditRes struct {
commonApi.EmptyRes
}
// RemindersGetReq 获取一条数据请求
type RemindersGetReq struct {
g.Meta `path:"/get" tags:"App-消息-提醒" method:"get" summary:"获取App-消息-提醒信息"`
commonApi.Author
Id uint `p:"id" v:"required#主键必须"` // 通过主键获取
}
// RemindersGetRes 获取一条数据结果
type RemindersGetRes struct {
g.Meta `mime:"application/json"`
*model.RemindersInfoRes
}
// RemindersDeleteReq 删除数据请求
type RemindersDeleteReq struct {
g.Meta `path:"/delete" tags:"App-消息-提醒" method:"delete" summary:"删除App-消息-提醒"`
commonApi.Author
Ids []uint `p:"ids" v:"required#主键必须"` // 通过主键删除
}
// RemindersDeleteRes 删除数据返回
type RemindersDeleteRes struct {
commonApi.EmptyRes
}