27 lines
640 B
Go
27 lines
640 B
Go
package dto
|
|
|
|
import (
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
"github.com/gogf/gf/v2/net/ghttp"
|
|
)
|
|
|
|
type AdminLoginReq struct {
|
|
g.Meta `path:"/login" method:"post" summary:"管理员登录"`
|
|
Username string `v:"required|length:1,64" json:"username"`
|
|
Password string `v:"required|length:6,64" json:"password"`
|
|
}
|
|
|
|
type AdminLoginRes struct {
|
|
Token string `json:"token"`
|
|
AdminId int64 `json:"admin_id"`
|
|
}
|
|
|
|
type AdminUploadReq struct {
|
|
g.Meta `path:"/upload" method:"post" summary:"素材上传" consumes:"multipart/form-data"`
|
|
File *ghttp.UploadFile `json:"file" v:"required"`
|
|
}
|
|
|
|
type AdminUploadRes struct {
|
|
Url string `json:"url"`
|
|
}
|