mirror of
https://github.com/flipped-aurora/gin-vue-admin.git
synced 2026-09-21 20:35:16 +00:00
Migrate all methods in the model package to the service package
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package request
|
||||
|
||||
// Paging common input parameter structure
|
||||
type PageInfo struct {
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"pageSize"`
|
||||
}
|
||||
|
||||
// Find by id structure
|
||||
type GetById struct {
|
||||
Id float64 `json:"id"`
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"github.com/dgrijalva/jwt-go"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
)
|
||||
|
||||
// Custom claims structure
|
||||
type CustomClaims struct {
|
||||
UUID uuid.UUID
|
||||
ID uint
|
||||
NickName string
|
||||
AuthorityId string
|
||||
jwt.StandardClaims
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package request
|
||||
|
||||
import "gin-vue-admin/model"
|
||||
|
||||
//api分页条件查询及排序结构体
|
||||
type SearchApiParams struct {
|
||||
model.SysApi
|
||||
PageInfo
|
||||
OrderKey string `json:"orderKey"`
|
||||
Desc bool `json:"desc"`
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package request
|
||||
|
||||
// Casbin info structure
|
||||
type CasbinInfo struct {
|
||||
Path string `json:"path"`
|
||||
Method string `json:"method"`
|
||||
}
|
||||
|
||||
// Casbin structure for input parameters
|
||||
type CasbinInReceive struct {
|
||||
AuthorityId string `json:"authorityId"`
|
||||
CasbinInfos []CasbinInfo `json:"casbinInfos"`
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package request
|
||||
|
||||
import "gin-vue-admin/model"
|
||||
|
||||
// Add menu authority info structure
|
||||
type AddMenuAuthorityInfo struct {
|
||||
Menus []model.SysBaseMenu
|
||||
AuthorityId string
|
||||
}
|
||||
|
||||
// Get role by id structure
|
||||
type AuthorityIdInfo struct {
|
||||
AuthorityId string
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package request
|
||||
|
||||
import uuid "github.com/satori/go.uuid"
|
||||
|
||||
// User register structure
|
||||
type RegisterStruct struct {
|
||||
Username string `json:"userName"`
|
||||
Password string `json:"passWord"`
|
||||
NickName string `json:"nickName" gorm:"default:'QMPlusUser'"`
|
||||
HeaderImg string `json:"headerImg" gorm:"default:'http://www.henrongyi.top/avatar/lufu.jpg'"`
|
||||
AuthorityId string `json:"authorityId" gorm:"default:888"`
|
||||
}
|
||||
|
||||
// User login structure
|
||||
type RegisterAndLoginStruct struct {
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
Captcha string `json:"captcha"`
|
||||
CaptchaId string `json:"captchaId"`
|
||||
}
|
||||
|
||||
// Modify password structure
|
||||
type ChangePasswordStruct struct {
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
NewPassword string `json:"newPassword"`
|
||||
}
|
||||
|
||||
// Modify user's auth structure
|
||||
type SetUserAuth struct {
|
||||
UUID uuid.UUID `json:"uuid"`
|
||||
AuthorityId string `json:"authorityId"`
|
||||
}
|
||||
Reference in New Issue
Block a user