mirror of
https://github.com/flipped-aurora/gin-vue-admin.git
synced 2026-09-21 20:35:16 +00:00
模块化变更
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
package request
|
||||
|
||||
import "gin-vue-admin/model"
|
||||
|
||||
// api分页条件查询及排序结构体
|
||||
type SearchApiParams struct {
|
||||
model.SysApi
|
||||
PageInfo
|
||||
OrderKey string `json:"orderKey"` // 排序
|
||||
Desc bool `json:"desc"` // 排序方式:升序false(默认)|降序true
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package request
|
||||
|
||||
type SysAutoHistory struct {
|
||||
PageInfo
|
||||
}
|
||||
|
||||
type AutoHistoryByID struct {
|
||||
ID uint `json:"id"`
|
||||
}
|
||||
|
||||
type DBReq struct {
|
||||
Database string `json:"database" gorm:"column:database"`
|
||||
}
|
||||
|
||||
type TableReq struct {
|
||||
TableName string `json:"tableName"`
|
||||
}
|
||||
|
||||
type ColumnReq struct {
|
||||
ColumnName string `json:"columnName" gorm:"column:column_name"`
|
||||
DataType string `json:"dataType" gorm:"column:data_type"`
|
||||
DataTypeLong string `json:"dataTypeLong" gorm:"column:data_type_long"`
|
||||
ColumnComment string `json:"columnComment" gorm:"column:column_comment"`
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
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"` // 权限id
|
||||
CasbinInfos []CasbinInfo `json:"casbinInfos"`
|
||||
}
|
||||
|
||||
func DefaultCasbin() []CasbinInfo {
|
||||
return []CasbinInfo{{Path: "/menu/getMenu", Method: "POST"}, {Path: "/jwt/jsonInBlacklist", Method: "POST"}}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package request
|
||||
|
||||
import "gin-vue-admin/model"
|
||||
|
||||
type SysDictionarySearch struct {
|
||||
model.SysDictionary
|
||||
PageInfo
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package request
|
||||
|
||||
import "gin-vue-admin/model"
|
||||
|
||||
type SysDictionaryDetailSearch struct {
|
||||
model.SysDictionaryDetail
|
||||
PageInfo
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
package request
|
||||
|
||||
type InitDB struct {
|
||||
Host string `json:"host"` // 服务器地址
|
||||
Port string `json:"port"` // 数据库连接端口
|
||||
UserName string `json:"userName" binding:"required"` // 数据库用户名
|
||||
Password string `json:"password"` // 数据库密码
|
||||
DBName string `json:"dbName" binding:"required"` // 数据库名
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"gin-vue-admin/global"
|
||||
"gin-vue-admin/model"
|
||||
)
|
||||
|
||||
// Add menu authority info structure
|
||||
type AddMenuAuthorityInfo struct {
|
||||
Menus []model.SysBaseMenu
|
||||
AuthorityId string // 角色ID
|
||||
}
|
||||
|
||||
func DefaultMenu() []model.SysBaseMenu {
|
||||
return []model.SysBaseMenu{{
|
||||
GVA_MODEL: global.GVA_MODEL{ID: 1},
|
||||
ParentId: "0",
|
||||
Path: "dashboard",
|
||||
Name: "dashboard",
|
||||
Component: "view/dashboard/index.vue",
|
||||
Sort: 1,
|
||||
Meta: model.Meta{
|
||||
Title: "仪表盘",
|
||||
Icon: "setting",
|
||||
},
|
||||
}}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package request
|
||||
|
||||
import "gin-vue-admin/model"
|
||||
|
||||
type SysOperationRecordSearch struct {
|
||||
model.SysOperationRecord
|
||||
PageInfo
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
package request
|
||||
|
||||
import uuid "github.com/satori/go.uuid"
|
||||
|
||||
// User register structure
|
||||
type Register 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 Login struct {
|
||||
Username string `json:"username"` // 用户名
|
||||
Password string `json:"password"` // 密码
|
||||
Captcha string `json:"captcha"` // 验证码
|
||||
CaptchaId string `json:"captchaId"` // 验证码ID
|
||||
}
|
||||
|
||||
// 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"` // 用户UUID
|
||||
AuthorityId string `json:"authorityId"` // 角色ID
|
||||
}
|
||||
Reference in New Issue
Block a user