Files
arenax-server/api/user/v1/user.go

102 lines
3.9 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.

package v1
import "github.com/gogf/gf/v2/frame/g"
type ListReq struct {
g.Meta `path:"/user/list" method:"get" tags:"User" summary:"(系统、商户门店后台)获取用户列表"`
Page int `json:"page" dc:"页数"`
Size int `json:"size" dc:"页数"`
}
type ListRes struct {
List interface{} `json:"list"`
Total int `json:"total"`
}
type InfoReq struct {
g.Meta `path:"/user/info" method:"get" tags:"User" summary:"(PC)获取用户信息"`
//OpenId string `json:"openId" v:"required#OpenId不能为空" dc:"OpenId"`
}
type InfoRes struct {
Id int `json:"id"`
WxOpenId string `json:"wxOpenId"`
Username string `json:"username"`
Nickname string `json:"nickname"`
Avatar string `json:"avatar"`
Email string `json:"email"`
PhoneNumber string `json:"phoneNumber"`
WxPopenId string `json:"wxPopenId"`
QQPopenId string `json:"qqPopenId"`
RoleId int `json:"roleId"`
}
type UpdateReq struct {
g.Meta `path:"/user" method:"put" tags:"User" summary:"(PC)更新用户头像,昵称"`
Avatar string `json:"avatar" v:"required#头像不能为空" dc:"头像"`
Nickname string `json:"nickname" v:"required#昵称不能为空" dc:"昵称"`
}
type UpdateRes struct {
Success bool `json:"success" dc:"是否成功"`
}
type BindPhoneReq struct {
g.Meta `path:"/user/bindPhone" method:"post" tags:"User" summary:"(PC)绑定手机号"`
Phone string `json:"phone" v:"required#手机号不能为空" dc:"手机号"`
Code string `json:"code" v:"required#验证码不能为空" dc:"验证码"`
}
type BindPhoneRes struct {
Success bool `json:"success" dc:"是否成功"`
}
type GetPhoneCodeReq struct {
g.Meta `path:"/user/getPhoneCode" method:"post" tags:"User" summary:"(PC)获取手机验证码"`
Phone string `json:"phone" v:"required#手机号不能为空" dc:"手机号"`
}
type GetPhoneCodeRes struct {
Success bool `json:"success" dc:"是否成功"`
}
type GetUserBoundInfoReq struct {
g.Meta `path:"/user/boundInfo" method:"get" tags:"User" summary:"(PC)获取用户绑定信息"`
PopenId string `json:"popenId" v:"required#popenId不能为空" dc:"用户详情接口返回的 wxPopenId 或者是 qqPopenId"`
}
type GetUserBoundInfoRes struct {
IsBound bool `json:"isBound" dc:"是否已绑定"`
Nick string `json:"nick" dc:"昵称"`
AppNames []string `json:"appNames" dc:"已绑定游戏名称"`
Utype int8 `json:"utype" dc:"用户类型,1: qq2: 微信"`
Ctime uint32 `json:"ctime" dc:"绑定时间"`
}
type GetBoundUrlReq struct {
g.Meta `path:"/user/boundUrl" method:"get" tags:"User" summary:"(PC)获取用户绑定url"`
PopenId string `json:"popenId" v:"required#popenId不能为空" dc:"用户详情接口返回的 wxPopenId 或者是 qqPopenId"`
BindType int `json:"bindType" v:"required|in:1,2#请选择绑定方式只能为1或2" dc:"绑定方式默认值11: qq; 2: wx" default:"1"`
AppName string `json:"appName" v:"required#请选择游戏" dc:"游戏名称"`
}
type GetBoundUrlRes struct {
Url string `json:"url" dc:"绑定的 h5 页面 url"`
}
type GetUnboundUrlReq struct {
g.Meta `path:"/user/unBoundUrl" method:"get" tags:"User" summary:"(PC)获取用户解绑url"`
PopenId string `json:"popenId" v:"required#popenId不能为空" dc:"用户详情接口返回的 wxPopenId 或者是 qqPopenId"`
BindType int `json:"bindType" v:"required|in:1,2#请选择绑定方式只能为1或2" dc:"绑定方式默认值11: qq; 2: wx" default:"1"`
AppName string `json:"appName" v:"required#请选择游戏" dc:"游戏名称"`
Nickname string `json:"nickname" v:"required#昵称不能为空" dc:"昵称"`
}
type GetUnboundUrlRes struct {
Url string `json:"url" dc:"解绑的 h5 页面 url"`
}
type DelUserReq struct {
g.Meta `path:"/user/del/{id}" method:"delete" tags:"User" summary:"(PC)删除用户"`
Id int `json:"id" v:"required#用户id不能为空" dc:"用户id"`
}
type DelUserRes struct {
Success bool `json:"success" dc:"是否成功"`
}