Files
arenax-server/api/auth/v1/auth.go
2025-07-10 19:08:53 +08:00

73 lines
2.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 AdminLoginReq struct {
g.Meta `path:"/admin/login" method:"post" tags:"Backend/Admin" summary:"(系统后台)管理员登录"`
Username string `json:"username" v:"required" dc:"用户名"`
Password string `json:"password" v:"required" dc:"密码"`
}
type AdminLoginRes struct {
g.Meta `mime:"application/json"`
Token string `json:"token"`
}
type MerchantLoginReq struct {
g.Meta `path:"/merchant/login" method:"post" tags:"Backend/Merchant" summary:"(商户门店后台)商户登录"`
Username string `json:"username" dc:"用户名"`
Phone string `json:"phone" v:"regex:^1[3-9]\\d{9}$" dc:"手机号"`
Code string `json:"code" dc:"验证码"`
Password string `json:"password" v:"required" dc:"密码"`
}
type MerchantLoginRes struct {
g.Meta `mime:"application/json"`
Token string `json:"token"`
}
type MerchantCodeReq struct {
g.Meta `path:"/merchant/code" method:"post" tags:"Backend/Merchant" summary:"(商户门店后台)商户获取短信验证码"`
Phone string `json:"phone" v:"required" dc:"手机号"`
}
type MerchantCodeRes struct{}
type MerchantRegisterReq struct {
g.Meta `path:"/merchant/register" method:"post" tags:"Backend/Merchant" summary:"(商户门店后台)商户注册"`
Username string `json:"username" v:"required" dc:"用户名"`
Phone string `json:"phone" v:"required|regex:^1[3-9]\\d{9}$" dc:"手机号"`
Code string `json:"code" v:"required" dc:"验证码"`
Password string `json:"password" v:"required|length:6,20" dc:"密码6-20位"`
Password2 string `json:"password2" v:"required|same:password" dc:"确认密码"`
ApplicationReason string `json:"applicationReason" v:"required|length:5,200" dc:"申请理由5~200字"`
}
type MerchantRegisterRes struct {
Success bool `json:"success" dc:"是否成功"`
Msg string `json:"msg" dc:"提示信息"`
}
type StoreLoginReq struct {
g.Meta `path:"/store/login" method:"post" tags:"PC-Server" summary:"(商户门店后台)门店登录"`
Username string `json:"username" v:"required" dc:"用户名"`
Password string `json:"password" v:"required" dc:"密码"`
}
type StoreLoginRes struct {
g.Meta `mime:"application/json"`
Token string `json:"token"`
StoreId int64 `json:"storeId"`
StoreName string `json:"storeName"`
NetbarAccount string `json:"netbarAccount"`
}
type Quan8AutologinReq struct {
g.Meta `path:"/quan8/autologin" method:"post" tags:"PC-Server" summary:"8圈用户自动登录该系统"`
UUID string `json:"uuid" v:"required#UUID不能为空" dc:"UUID"`
StoreId int64 `json:"storeId" v:"required#门店ID不能为空" dc:"门店ID"`
}
type Quan8AutologinRes struct {
Token string `json:"token"`
}