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:"获取用户信息"` 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:"更新用户头像,昵称"` 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:"绑定手机号"` 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:"获取手机验证码"` 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:"获取用户绑定信息"` PopenId string `json:"popenId" v:"required#popenId不能为空" dc:"用户详情接口返回的 wxPopenId 或者是 qqPopenId"` } type GetUserBoundInfoRes struct { IsBound bool `json:"isBound" dc:"是否已绑定"` } type GetBoundUrlReq struct { g.Meta `path:"/user/boundUrl" method:"get" tags:"User" summary:"获取用户绑定url"` PopenId string `json:"popenId" v:"required#popenId不能为空" dc:"用户详情接口返回的 wxPopenId 或者是 qqPopenId"` BindType int `json:"bindType" v:"required|in:1,2#请选择绑定方式,只能为1或2" dc:"绑定方式,默认值1,1: 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:"获取用户解绑url"` PopenId string `json:"popenId" v:"required#popenId不能为空" dc:"用户详情接口返回的 wxPopenId 或者是 qqPopenId"` BindType int `json:"bindType" v:"required|in:1,2#请选择绑定方式,只能为1或2" dc:"绑定方式,默认值1,1: 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"` }