mirror of
https://github.com/PengZhangs2017582/novel.git
synced 2025-06-22 10:11:30 +08:00
redis token
This commit is contained in:
64
api/backend/writer.go
Normal file
64
api/backend/writer.go
Normal file
@ -0,0 +1,64 @@
|
||||
package backend
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// type WriterReq struct {
|
||||
// g.Meta `path:"/writer/add" tags:"writer" method:"post" summary:"writer add api"`
|
||||
// Name string `json:"name" v:"required#用户名不能为空" dc:"用户名"`
|
||||
// Password string `json:"password" v:"required#密码不能为空" dc:"密码"`
|
||||
// RoleIds string `json:"role_ids" dc:"角色ids"`
|
||||
// IsAdmin int `json:"is_admin" dc:"是否超级管理员"`
|
||||
// }
|
||||
//
|
||||
// type WriterRes struct {
|
||||
// AdminId int `json:"admin_id"`
|
||||
// }
|
||||
//
|
||||
// type AdminDeleteReq struct {
|
||||
// g.Meta `path:"/admin/delete" method:"delete" tags:"管理员" summary:"删除管理员接口"`
|
||||
// Id uint `v:"min:1#请选择需要删除的管理员" dc:"管理员id"`
|
||||
// }
|
||||
// type AdminDeleteRes struct{}
|
||||
//
|
||||
// type AdminUpdateReq struct {
|
||||
// g.Meta `path:"/admin/update/{Id}" method:"post" tags:"管理员" summary:"修改管理员接口"`
|
||||
// Id uint `json:"id" v:"min:1#请选择需要修改的管理员" dc:"管理员Id"`
|
||||
// Name string `json:"name" v:"required#用户名不能为空" dc:"用户名"`
|
||||
// Password string `json:"password" v:"required#密码不能为空" dc:"密码"`
|
||||
// RoleIds string `json:"role_ids" dc:"角色ids"`
|
||||
// IsAdmin int `json:"is_admin" dc:"是否超级管理员"`
|
||||
// }
|
||||
// type AdminUpdateRes struct {
|
||||
// Id uint `json:"id"`
|
||||
// }
|
||||
// type AdminGetListCommonReq struct {
|
||||
// g.Meta `path:"/admin/list" method:"get" tags:"管理员" summary:"管理员列表接口"`
|
||||
// // CommonPaginationReq
|
||||
// }
|
||||
// type AdminGetListCommonRes struct {
|
||||
// List interface{} `json:"list" description:"列表"`
|
||||
// Page int `json:"page" description:"分页码"`
|
||||
// Size int `json:"size" description:"分页数量"`
|
||||
// Total int `json:"total" description:"数据总数"`
|
||||
// }
|
||||
|
||||
type WriterGetInfoReq struct {
|
||||
g.Meta `path:"/writer/info" method:"get"`
|
||||
}
|
||||
|
||||
// for jwt
|
||||
// type AdminGetInfoRes struct {
|
||||
// Id int `json:"id"`
|
||||
// IdentityKey string `json:"identity_key"`
|
||||
// Payload string `json:"payload"`
|
||||
// }
|
||||
|
||||
// for gtoken
|
||||
type WriterGetInfoRes struct {
|
||||
Id int `json:"id"`
|
||||
PenName string `json:"pen_name"`
|
||||
RoleIds string `json:"role_ids"`
|
||||
IsAdmin int `json:"is_admin"`
|
||||
}
|
Reference in New Issue
Block a user