package v1

import "github.com/gogf/gf/v2/frame/g"

type AdminLoginReq struct {
	g.Meta   `path:"/admin/login" tags:"Backend/Admin" method:"post" summary:"管理员登录"`
	Username string `json:"username" v:"required" dc:"用户名"`
	Password string `json:"password" v:"required" dc:"密码"`
}
type AdminLoginRes struct {
	Token string `json:"token" dc:"token"`
}
type UserLoginReq struct {
	g.Meta   `path:"/user/login" tags:"APP/User" method:"post" summary:"用户登录"`
	Email    string `json:"email" v:"required" dc:"邮箱"`
	Password string `json:"password" v:"required" dc:"密码"`
}
type UserLoginRes struct {
	Token string `json:"token" dc:"token"`
}
type UserRegisterReq struct {
	g.Meta    `path:"/user/register" tags:"APP/User" method:"post" summary:"用户注册"`
	Email     string `json:"email" v:"required" dc:"邮箱"`
	Password  string `json:"password" v:"required" dc:"密码"`
	Password2 string `json:"password2" v:"required|same:password" dc:"确认密码"`
}
type UserRegisterRes struct {
	Success bool `json:"success" dc:"是否成功"`
}
type UserEditPassReq struct {
	g.Meta    `path:"/user/editPass" tags:"APP/User" method:"post" summary:"修改密码"`
	Email     string `json:"email" v:"required" dc:"邮箱"`
	Password  string `json:"password" v:"required" dc:"密码"`
	Password2 string `json:"password2" v:"required|same:password" dc:"确认密码"`
	Sign      string `json:"sign" v:"required" dc:"验证码"`
}

type UserEditPassRes struct {
	Success bool `json:"success" dc:"是否成功"`
}
type UserCodeReq struct {
	g.Meta `path:"/user/code" tags:"APP/User" method:"post" summary:"获取验证码"`
	Email  string `json:"email" v:"required" dc:"邮箱"`
}
type UserCodeRes struct {
	Success bool `json:"success" dc:"是否成功"`
}

type AuthorLoginReq struct {
	g.Meta   `path:"/author/login" tags:"APP/Author" method:"post" summary:"作者登录"`
	Email    string `json:"email" v:"required" dc:"邮箱"`
	Password string `json:"password" v:"required" dc:"密码"`
}
type AuthorLoginRes struct {
	Token string `json:"token" dc:"token"`
}
