Files
novel_server/internal/model/user.go

92 lines
1.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 model
import "github.com/gogf/gf/v2/frame/g"
type User struct {
g.Meta `orm:"table:users"`
Id int64 `json:"id" orm:"id"`
Email string `json:"email" orm:"email"`
Username string `json:"username" orm:"username"`
Avatar string `json:"avatar" orm:"avatar"`
AttentionCount int `json:"attentionCount" orm:"attention_count"`
BackGroundUrl string `json:"backgroundUrl" orm:"background_url"`
}
type AppUser struct {
g.Meta `orm:"table:users"`
Id int64 `json:"id" orm:"id"`
Avatar string `json:"avatar" orm:"avatar"`
}
type UserLoginIn struct {
Email string // 用户名
Password string // 密码
}
type UserLoginOut struct {
Token string // 登录令牌
}
type UserRegisterIn struct {
Email string // 用户名
Password string // 密码
Password2 string // 邮箱
}
type UserRegisterOut struct {
Success bool // 是否成功
}
type UserInfoIn struct {
UserId int64 // 用户ID
}
type UserInfoOut struct {
Id int64 // 用户ID
Username string // 用户名
Email string // 邮箱
Points uint64 // 积分
Avatar string // 头像
BackgroundUrl string // 背景图片
AttentionCount int // 关注数
IsAuthor bool // 是否是作者
AuthorStatus int // 作者申请状态0无1通过2禁用3拒绝2/3为未通过
}
type UserDeleteIn struct {
UserId int64 // 用户ID
Password string // 密码
}
type UserDeleteOut struct {
Success bool // 是否成功
}
type UserCodeIn struct {
Email string // 邮箱
}
type UserCodeOut struct {
Success bool // 是否成功
}
type UserEditPassIn struct {
Email string
Password string
Password2 string
Sign string
}
type UserEditPassOut struct {
Success bool // 是否成功
}
type VertifyCodeIn struct {
Email string
Code string
}
type VertifyCodeOut struct {
Sign string
}
type UserInfoAPI struct {
}