Files
novel_server/api/user/v1/user.go

39 lines
1.3 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 InfoReq struct {
g.Meta `path:"/user/info" tags:"APP/User" method:"get" summary:"获取用户信息"`
}
type InfoRes struct {
g.Meta `mime:"application/json"`
Id int64 `json:"id" dc:"用户ID"`
Username string `json:"username" dc:"用户名"`
Avatar string `json:"avatar" dc:"头像URL"`
Email string `json:"email" dc:"邮箱"`
Points uint64 `json:"points" dc:"积分数量"`
BackgroundUrl string `json:"backgroundUrl" dc:"背景图片URL"`
AttentionCount int `json:"attentionCount" dc:"关注数量"`
Role string `json:"role" dc:"用户角色"`
IsAuthor bool `json:"isAuthor" dc:"是否是作者"`
AuthorStatus int `json:"authorStatus" dc:"作者申请状态0=未申请1=审核中2=已通过3=已拒绝"`
}
type DeleteReq struct {
g.Meta `path:"/user/delete" tags:"APP/User" method:"post" summary:"删除用户"`
Password string `json:"password" v:"required" dc:"密码"`
}
type DeleteRes struct {
Success bool `json:"success" dc:"是否成功"`
}
type LogoutReq struct {
g.Meta `path:"/user/logout" tags:"APP/User" method:"post" summary:"登出"`
}
type LogoutRes struct {
Success bool `json:"success" dc:"是否成功"`
}