实现商户注册、管理员审核商户申请接口
This commit is contained in:
@ -7,6 +7,7 @@ type AdminLoginReq struct {
|
||||
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"`
|
||||
@ -14,16 +15,37 @@ type AdminLoginRes struct {
|
||||
|
||||
type MerchantLoginReq struct {
|
||||
g.Meta `path:"/merchant/login" method:"post" tags:"Merchant" summary:"(商户管理员)商户登录"`
|
||||
Usernaem string `json:"username" v:"required" dc:"用户名"`
|
||||
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 MerchantRegisterReq struct {
|
||||
|
||||
type MerchantCodeReq struct {
|
||||
g.Meta `path:"/merchant/code" method:"get" tags:"Merchant" summary:"(商户管理员)商户获取短信验证码"`
|
||||
Phone string `json:"phone" v:"required" dc:"手机号"`
|
||||
}
|
||||
|
||||
type MerchantCodeRes struct{}
|
||||
|
||||
type MerchantRegisterReq struct {
|
||||
g.Meta `path:"/merchant/register" method:"post" tags:"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 {
|
||||
@ -31,6 +53,7 @@ type StoreLoginReq struct {
|
||||
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"`
|
||||
|
||||
Reference in New Issue
Block a user