mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-26 16:46:14 +08:00
This commit is contained in:
@@ -7,6 +7,7 @@ package common
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"hotgo/internal/model"
|
||||
"hotgo/internal/model/input/adminin"
|
||||
)
|
||||
|
||||
@@ -16,6 +17,15 @@ type LoginLogoutReq struct {
|
||||
}
|
||||
type LoginLogoutRes struct{}
|
||||
|
||||
// RegisterReq 提交账号注册
|
||||
type RegisterReq struct {
|
||||
g.Meta `path:"/site/register" method:"post" tags:"后台基础" summary:"账号注册"`
|
||||
adminin.RegisterInp
|
||||
}
|
||||
type RegisterRes struct {
|
||||
*adminin.LoginModel
|
||||
}
|
||||
|
||||
// LoginCaptchaReq 获取登录验证码
|
||||
type LoginCaptchaReq struct {
|
||||
g.Meta `path:"/site/captcha" method:"get" tags:"后台基础" summary:"获取登录验证码"`
|
||||
@@ -25,17 +35,22 @@ type LoginCaptchaRes struct {
|
||||
Base64 string `json:"base64" dc:"验证码"`
|
||||
}
|
||||
|
||||
// LoginReq 提交登录
|
||||
type LoginReq struct {
|
||||
g.Meta `path:"/site/login" method:"post" tags:"后台基础" summary:"账号登录"`
|
||||
Username string `json:"username" v:"required#用户名不能为空" dc:"用户名"`
|
||||
Password string `json:"password" v:"required#密码不能为空" dc:"密码"`
|
||||
Cid string `json:"cid" dc:"验证码ID"`
|
||||
Code string `json:"code" dc:"验证码"`
|
||||
IsLock bool `json:"isLock" dc:"是否为锁屏状态"`
|
||||
// AccountLoginReq 提交账号登录
|
||||
type AccountLoginReq struct {
|
||||
g.Meta `path:"/site/accountLogin" method:"post" tags:"后台基础" summary:"账号登录"`
|
||||
adminin.AccountLoginInp
|
||||
}
|
||||
type LoginRes struct {
|
||||
*adminin.MemberLoginModel
|
||||
type AccountLoginRes struct {
|
||||
*adminin.LoginModel
|
||||
}
|
||||
|
||||
// MobileLoginReq 提交手机号登录
|
||||
type MobileLoginReq struct {
|
||||
g.Meta `path:"/site/mobileLogin" method:"post" tags:"后台基础" summary:"手机号登录"`
|
||||
adminin.MobileLoginInp
|
||||
}
|
||||
type MobileLoginRes struct {
|
||||
*adminin.LoginModel
|
||||
}
|
||||
|
||||
// SiteConfigReq 获取配置
|
||||
@@ -43,9 +58,18 @@ type SiteConfigReq struct {
|
||||
g.Meta `path:"/site/config" method:"get" tags:"后台基础" summary:"获取配置"`
|
||||
}
|
||||
type SiteConfigRes struct {
|
||||
Version string `json:"version" dc:"系统版本"`
|
||||
WsAddr string `json:"wsAddr" dc:"客户端websocket地址"`
|
||||
Domain string `json:"domain" dc:"对外域名"`
|
||||
Version string `json:"version" dc:"系统版本"`
|
||||
WsAddr string `json:"wsAddr" dc:"客户端websocket地址"`
|
||||
Domain string `json:"domain" dc:"对外域名"`
|
||||
//InviteUrl string `json:"inviteUrl" dc:"邀请注册地址"`
|
||||
}
|
||||
|
||||
// SiteLoginConfigReq 获取登录配置
|
||||
type SiteLoginConfigReq struct {
|
||||
g.Meta `path:"/site/loginConfig" method:"get" tags:"后台基础" summary:"获取登录配置"`
|
||||
}
|
||||
type SiteLoginConfigRes struct {
|
||||
*model.LoginConfig
|
||||
}
|
||||
|
||||
// SitePingReq ping
|
||||
|
@@ -3,7 +3,6 @@
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package common
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
@@ -24,3 +23,12 @@ type SendBindSmsReq struct {
|
||||
}
|
||||
type SendBindSmsRes struct {
|
||||
}
|
||||
|
||||
// SendSmsReq 发送短信
|
||||
type SendSmsReq struct {
|
||||
g.Meta `path:"/sms/send" tags:"短信" method:"post" summary:"发送短信"`
|
||||
Event string `json:"event" v:"required#事件模板不能为空" dc:"事件模板"`
|
||||
Mobile string `json:"mobile" v:"required#接收手机号不能为空" dc:"接收手机号"`
|
||||
}
|
||||
type SendSmsRes struct {
|
||||
}
|
||||
|
@@ -53,33 +53,6 @@ type ResetPwdReq struct {
|
||||
}
|
||||
type ResetPwdRes struct{}
|
||||
|
||||
// EmailUniqueReq 邮箱是否唯一
|
||||
type EmailUniqueReq struct {
|
||||
g.Meta `path:"/member/emailUnique" method:"get" tags:"用户" summary:"邮箱是否唯一"`
|
||||
adminin.MemberEmailUniqueInp
|
||||
}
|
||||
type EmailUniqueRes struct {
|
||||
*adminin.MemberEmailUniqueModel
|
||||
}
|
||||
|
||||
// MobileUniqueReq 手机号是否唯一
|
||||
type MobileUniqueReq struct {
|
||||
g.Meta `path:"/member/mobileUnique" method:"get" tags:"用户" summary:"手机号是否唯一"`
|
||||
adminin.MemberMobileUniqueInp
|
||||
}
|
||||
type MobileUniqueRes struct {
|
||||
*adminin.MemberMobileUniqueModel
|
||||
}
|
||||
|
||||
// NameUniqueReq 名称是否唯一
|
||||
type NameUniqueReq struct {
|
||||
g.Meta `path:"/member/nameUnique" method:"get" tags:"用户" summary:"用户名称是否唯一"`
|
||||
adminin.MemberNameUniqueInp
|
||||
}
|
||||
type NameUniqueRes struct {
|
||||
*adminin.MemberNameUniqueModel
|
||||
}
|
||||
|
||||
// ListReq 查询列表
|
||||
type ListReq struct {
|
||||
g.Meta `path:"/member/list" method:"get" tags:"用户" summary:"获取用户列表"`
|
||||
@@ -114,15 +87,6 @@ type DeleteReq struct {
|
||||
}
|
||||
type DeleteRes struct{}
|
||||
|
||||
// LoginInfoReq 获取登录用户信息
|
||||
type LoginInfoReq struct {
|
||||
g.Meta `path:"/member/info" method:"get" tags:"用户" summary:"获取登录用户信息" dc:"获取管理后台的登录用户信息"`
|
||||
}
|
||||
|
||||
type LoginInfoRes struct {
|
||||
*adminin.LoginMemberInfoModel
|
||||
}
|
||||
|
||||
// StatusReq 更新用户状态
|
||||
type StatusReq struct {
|
||||
g.Meta `path:"/member/status" method:"post" tags:"用户" summary:"更新用户状态"`
|
||||
@@ -132,10 +96,18 @@ type StatusRes struct{}
|
||||
|
||||
// SelectReq 获取可选的后台用户选项
|
||||
type SelectReq struct {
|
||||
g.Meta `path:"/member/option" method:"get" summary:"用户" tags:"获取可选的后台用户选项"`
|
||||
g.Meta `path:"/member/option" method:"get" tags:"用户" summary:"获取可选的后台用户选项"`
|
||||
}
|
||||
type SelectRes []*adminin.MemberSelectModel
|
||||
|
||||
// InfoReq 获取登录用户信息
|
||||
type InfoReq struct {
|
||||
g.Meta `path:"/member/info" method:"get" tags:"用户" summary:"获取登录用户信息"`
|
||||
}
|
||||
type InfoRes struct {
|
||||
*adminin.LoginMemberInfoModel
|
||||
}
|
||||
|
||||
// AddBalanceReq 增加余额
|
||||
type AddBalanceReq struct {
|
||||
g.Meta `path:"/member/addBalance" method:"post" tags:"用户" summary:"增加余额"`
|
||||
|
Reference in New Issue
Block a user