102 lines
3.6 KiB
Go
102 lines
3.6 KiB
Go
|
// ==========================================================================
|
|||
|
// GFast自动生成api操作代码。
|
|||
|
// 生成日期:2024-07-26 15:32:12
|
|||
|
// 生成路径: api/v1/system/user_registration.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"
|
|||
|
)
|
|||
|
|
|||
|
// UserRegistrationSearchReq 分页请求参数
|
|||
|
type UserRegistrationSearchReq struct {
|
|||
|
g.Meta `path:"/list" tags:"极光推送" method:"get" summary:"极光推送列表"`
|
|||
|
Id string `p:"id"` //
|
|||
|
UserId string `p:"userId" v:"userId@integer#用户ID需为整数"` // 用户ID
|
|||
|
OpenId string `p:"openId"` // 微信 open_id
|
|||
|
RegistrationId string `p:"registrationId"` // 极光推送 设备唯一标识
|
|||
|
CreatedAt string `p:"createdAt" v:"createdAt@datetime#需为YYYY-MM-DD hh:mm:ss格式"` //
|
|||
|
commonApi.PageReq
|
|||
|
commonApi.Author
|
|||
|
}
|
|||
|
|
|||
|
// UserRegistrationSearchRes 列表返回结果
|
|||
|
type UserRegistrationSearchRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
commonApi.ListRes
|
|||
|
List []*model.UserRegistrationListRes `json:"list"`
|
|||
|
}
|
|||
|
|
|||
|
// UserRegistrationAddReq 添加操作请求参数
|
|||
|
type UserRegistrationAddReq struct {
|
|||
|
g.Meta `path:"/add" tags:"极光推送" method:"post" summary:"极光推送添加"`
|
|||
|
commonApi.Author
|
|||
|
UserId int `p:"userId" `
|
|||
|
OpenId string `p:"openId" `
|
|||
|
RegistrationId string `p:"registrationId" `
|
|||
|
}
|
|||
|
|
|||
|
// UserRegistrationAddRes 添加操作返回结果
|
|||
|
type UserRegistrationAddRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// UserRegistrationEditReq 修改操作请求参数
|
|||
|
type UserRegistrationEditReq struct {
|
|||
|
g.Meta `path:"/edit" tags:"极光推送" method:"put" summary:"极光推送修改"`
|
|||
|
commonApi.Author
|
|||
|
Id uint `p:"id" v:"required#主键ID不能为空"`
|
|||
|
UserId int `p:"userId" `
|
|||
|
OpenId string `p:"openId" `
|
|||
|
RegistrationId string `p:"registrationId" `
|
|||
|
}
|
|||
|
|
|||
|
// UserRegistrationEditRes 修改操作返回结果
|
|||
|
type UserRegistrationEditRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// UserRegistrationGetReq 获取一条数据请求
|
|||
|
type UserRegistrationGetReq struct {
|
|||
|
g.Meta `path:"/get" tags:"极光推送" method:"get" summary:"获取极光推送信息"`
|
|||
|
commonApi.Author
|
|||
|
Id uint `p:"id" v:"required#主键必须"` // 通过主键获取
|
|||
|
}
|
|||
|
|
|||
|
// UserRegistrationGetRes 获取一条数据结果
|
|||
|
type UserRegistrationGetRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
*model.UserRegistrationInfoRes
|
|||
|
}
|
|||
|
|
|||
|
// UserRegistrationDeleteReq 删除数据请求
|
|||
|
type UserRegistrationDeleteReq struct {
|
|||
|
g.Meta `path:"/delete" tags:"极光推送" method:"delete" summary:"删除极光推送"`
|
|||
|
commonApi.Author
|
|||
|
Ids []uint `p:"ids" v:"required#主键必须"` // 通过主键删除
|
|||
|
}
|
|||
|
|
|||
|
// UserRegistrationDeleteRes 删除数据返回
|
|||
|
type UserRegistrationDeleteRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// UserRegistrationRegisterReq 为当前用户注册设备 RegistrationId
|
|||
|
type UserRegistrationRegisterReq struct {
|
|||
|
g.Meta `path:"/register" tags:"极光推送" method:"post" summary:"为当前用户注册设备 RegistrationId"`
|
|||
|
RegistrationId string `p:"registrationId" v:"required#RegistrationId不能为空"` // RegistrationId
|
|||
|
commonApi.Author
|
|||
|
}
|
|||
|
|
|||
|
// UserRegistrationRegisterRes 为当前用户注册设备 RegistrationId 返回
|
|||
|
type UserRegistrationRegisterRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|