书籍列表接口新增参数

This commit is contained in:
2025-08-13 15:19:42 +08:00
parent 6ccc87f2bf
commit 8afe651c64
201 changed files with 6987 additions and 1066 deletions

View File

@ -16,4 +16,5 @@ type IAuthV1 interface {
UserRegister(ctx context.Context, req *v1.UserRegisterReq) (res *v1.UserRegisterRes, err error)
UserEditPass(ctx context.Context, req *v1.UserEditPassReq) (res *v1.UserEditPassRes, err error)
UserCode(ctx context.Context, req *v1.UserCodeReq) (res *v1.UserCodeRes, err error)
AuthorLogin(ctx context.Context, req *v1.AuthorLoginReq) (res *v1.AuthorLoginRes, err error)
}

View File

@ -3,7 +3,7 @@ package v1
import "github.com/gogf/gf/v2/frame/g"
type AdminLoginReq struct {
g.Meta `path:"/admin/login" tags:"Admin" method:"post" summary:"管理员登录"`
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:"密码"`
}
@ -45,3 +45,12 @@ type UserCodeReq struct {
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"`
}