生成表结构,开始实现接口逻辑
This commit is contained in:
10
api/admin/v1/admin.go
Normal file
10
api/admin/v1/admin.go
Normal file
@ -0,0 +1,10 @@
|
||||
package v1
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
type AdminInfoReq struct {
|
||||
g.Meta `path:"/admin/info" method:"get" tags:"Admin" summary:"获取管理员信息"`
|
||||
}
|
||||
type AdminInfoRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
}
|
||||
@ -1 +1,37 @@
|
||||
package v1
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
type AdminLoginReq struct {
|
||||
g.Meta `path:"/admin/login" method:"post" tags:"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:"Merchant" summary:"商户登录"`
|
||||
Usernaem string `json:"username" v:"required" dc:"用户名"`
|
||||
Password string `json:"password" v:"required" dc:"密码"`
|
||||
}
|
||||
type MerchantLoginRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
Token string `json:"token"`
|
||||
}
|
||||
type MerchantRegisterReq struct {
|
||||
}
|
||||
type MerchantRegisterRes struct {
|
||||
}
|
||||
|
||||
type StoreLoginReq struct {
|
||||
g.Meta `path:"/store/login" method:"post" tags:"Store" 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"`
|
||||
}
|
||||
|
||||
42
api/wx/v1/wx.go
Normal file
42
api/wx/v1/wx.go
Normal file
@ -0,0 +1,42 @@
|
||||
package v1
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
type WeChatLoginReq struct {
|
||||
g.Meta `path:"/wechat/login" method:"post" tags:"WeChat" summary:"获取微信二维码登录"`
|
||||
UUID string `json:"uuid" v:"required" dc:"UUID"`
|
||||
}
|
||||
type WeChatLoginRes struct {
|
||||
}
|
||||
|
||||
type WeChatEventReq struct {
|
||||
g.Meta `path:"/wechat" method:"post" tags:"WeChat" summary:"微信订阅事件"`
|
||||
ToUserName string `xml:"ToUserName" dc:"开发者微信号" json:"ToUserName,omitempty"`
|
||||
FromUserName string `xml:"FromUserName" dc:"发送方账号(OpenID)" json:"FromUserName,omitempty"`
|
||||
CreateTime int64 `xml:"CreateTime" dc:"消息创建时间" json:"CreateTime,omitempty"`
|
||||
MsgType string `xml:"MsgType" dc:"消息类型" json:"MsgType,omitempty"`
|
||||
Event string `xml:"Event" dc:"事件类型 subscribe | SCAN" json:"Event,omitempty"`
|
||||
EventKey string `xml:"EventKey" dc:"事件KEY值" json:"EventKey,omitempty"`
|
||||
Ticket string `xml:"Ticket" dc:"二维码ticket" json:"Ticket,omitempty"`
|
||||
}
|
||||
|
||||
type WeChatEventRes struct {
|
||||
}
|
||||
|
||||
type WeChatVertifyReq struct {
|
||||
g.Meta `path:"/wechat" method:"Get" tags:"WeChat" summary:"微信服务器验证接口"`
|
||||
Signature string `json:"signature" v:"required" dc:"微信签名"`
|
||||
EchoStr string `json:"echostr" v:"required" dc:"随机字符串"`
|
||||
Timestamp string `json:"timestamp" v:"required" dc:"时间戳"`
|
||||
Nonce string `json:"nonce" v:"required" dc:"随机数"`
|
||||
}
|
||||
|
||||
type WeChatVertifyRes struct {
|
||||
}
|
||||
|
||||
type WeChatPollingReq struct {
|
||||
g.Meta `path:"/wechat/polling" method:"post" tags:"WeChat" summary:"微信长轮询"`
|
||||
UUID string `json:"uuid" v:"required" dc:"UUID"`
|
||||
}
|
||||
type WeChatPollingRes struct {
|
||||
}
|
||||
Reference in New Issue
Block a user