mirror of
https://gitcode.com/flipped-aurora/gin-vue-admin.git
synced 2026-05-20 14:18:24 +00:00
模块化变更
This commit is contained in:
23
server/model/example/request/common.go
Normal file
23
server/model/example/request/common.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package request
|
||||
|
||||
// Paging common input parameter structure
|
||||
type PageInfo struct {
|
||||
Page int `json:"page" form:"page"` // 页码
|
||||
PageSize int `json:"pageSize" form:"pageSize"` // 每页大小
|
||||
}
|
||||
|
||||
// Find by id structure
|
||||
type GetById struct {
|
||||
ID float64 `json:"id" form:"id"` // 主键ID
|
||||
}
|
||||
|
||||
type IdsReq struct {
|
||||
Ids []int `json:"ids" form:"ids"`
|
||||
}
|
||||
|
||||
// Get role by id structure
|
||||
type GetAuthorityId struct {
|
||||
AuthorityId string // 角色ID
|
||||
}
|
||||
|
||||
type Empty struct{}
|
||||
17
server/model/example/request/jwt.go
Normal file
17
server/model/example/request/jwt.go
Normal file
@@ -0,0 +1,17 @@
|
||||
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
|
||||
Username string
|
||||
NickName string
|
||||
AuthorityId string
|
||||
BufferTime int64
|
||||
jwt.StandardClaims
|
||||
}
|
||||
Reference in New Issue
Block a user