93 lines
3.7 KiB
Go
93 lines
3.7 KiB
Go
// ==========================================================================
|
||
// GFast自动生成api操作代码。
|
||
// 生成日期:2024-04-11 16:58:12
|
||
// 生成路径: api/v1/system/notification_recipients.go
|
||
// 生成人:gfast
|
||
// desc:通知接收相关参数
|
||
// 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"
|
||
)
|
||
|
||
// NotificationRecipientsSearchReq 分页请求参数
|
||
type NotificationRecipientsSearchReq struct {
|
||
g.Meta `path:"/list" tags:"通知接收" method:"get" summary:"通知接收列表"`
|
||
Id string `p:"id"` //
|
||
CreatedAt string `p:"createdAt" v:"createdAt@datetime#需为YYYY-MM-DD hh:mm:ss格式"` //
|
||
NotificationId string `p:"notificationId" v:"notificationId@integer#关联的通知ID需为整数"` //关联的通知ID
|
||
RecipientId string `p:"recipientId" v:"recipientId@integer#接收者ID需为整数"` //接收者ID
|
||
RecipientRole string `p:"recipientRole"` //接收者权限
|
||
NotificationStatus string `p:"notificationStatus" v:"notificationStatus@integer#0 未读 | 1 已读需为整数"` //0 未读 | 1 已读
|
||
commonApi.PageReq
|
||
commonApi.Author
|
||
}
|
||
|
||
// NotificationRecipientsSearchRes 列表返回结果
|
||
type NotificationRecipientsSearchRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
commonApi.ListRes
|
||
List []*model.NotificationRecipientsListRes `json:"list"`
|
||
}
|
||
|
||
// NotificationRecipientsAddReq 添加操作请求参数
|
||
type NotificationRecipientsAddReq struct {
|
||
g.Meta `path:"/add" tags:"通知接收" method:"post" summary:"通知接收添加"`
|
||
commonApi.Author
|
||
NotificationId int `p:"notificationId" `
|
||
RecipientId int `p:"recipientId" `
|
||
RecipientRole string `p:"recipientRole" `
|
||
NotificationStatus int `p:"notificationStatus" v:"required#0 未读 | 1 已读不能为空"`
|
||
}
|
||
|
||
// NotificationRecipientsAddRes 添加操作返回结果
|
||
type NotificationRecipientsAddRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// NotificationRecipientsEditReq 修改操作请求参数
|
||
type NotificationRecipientsEditReq struct {
|
||
g.Meta `path:"/edit" tags:"通知接收" method:"put" summary:"通知接收修改"`
|
||
commonApi.Author
|
||
Id uint `p:"id" v:"required#主键ID不能为空"`
|
||
NotificationId int `p:"notificationId" `
|
||
RecipientId int `p:"recipientId" `
|
||
RecipientRole string `p:"recipientRole" `
|
||
NotificationStatus int `p:"notificationStatus" v:"required#0 未读 | 1 已读不能为空"`
|
||
}
|
||
|
||
// NotificationRecipientsEditRes 修改操作返回结果
|
||
type NotificationRecipientsEditRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// NotificationRecipientsGetReq 获取一条数据请求
|
||
type NotificationRecipientsGetReq struct {
|
||
g.Meta `path:"/get" tags:"通知接收" method:"get" summary:"获取通知接收信息"`
|
||
commonApi.Author
|
||
Id uint `p:"id" v:"required#主键必须"` //通过主键获取
|
||
}
|
||
|
||
// NotificationRecipientsGetRes 获取一条数据结果
|
||
type NotificationRecipientsGetRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
*model.NotificationRecipientsInfoRes
|
||
}
|
||
|
||
// NotificationRecipientsDeleteReq 删除数据请求
|
||
type NotificationRecipientsDeleteReq struct {
|
||
g.Meta `path:"/delete" tags:"通知接收" method:"delete" summary:"删除通知接收"`
|
||
commonApi.Author
|
||
Ids []uint `p:"ids" v:"required#主键必须"` //通过主键删除
|
||
}
|
||
|
||
// NotificationRecipientsDeleteRes 删除数据返回
|
||
type NotificationRecipientsDeleteRes struct {
|
||
commonApi.EmptyRes
|
||
}
|