🎨 清理多余文件,修改项目model
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/common/request"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/system"
|
||||
)
|
||||
|
||||
// api分页条件查询及排序结构体
|
||||
@@ -15,7 +15,7 @@ type SearchApiParams struct {
|
||||
|
||||
// SetApiAuthorities 通过API路径和方法全量覆盖关联角色列表
|
||||
type SetApiAuthorities struct {
|
||||
Path string `json:"path" form:"path"` // API路径
|
||||
Method string `json:"method" form:"method"` // 请求方法
|
||||
AuthorityIds []uint `json:"authorityIds" form:"authorityIds"` // 角色ID列表
|
||||
Path string `json:"path" form:"path"` // API路径
|
||||
Method string `json:"method" form:"method"` // 请求方法
|
||||
AuthorityIds []uint `json:"authorityIds" form:"authorityIds"` // 角色ID列表
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/common/request"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/system"
|
||||
)
|
||||
|
||||
type SysApiTokenSearch struct {
|
||||
system.SysApiToken
|
||||
request.PageInfo
|
||||
Status *bool `json:"status" form:"status"`
|
||||
Status *bool `json:"status" form:"status"`
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/common/request"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/system"
|
||||
)
|
||||
|
||||
type SysDictionaryDetailSearch struct {
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
|
||||
package request
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/common/request"
|
||||
"time"
|
||||
)
|
||||
|
||||
type SysErrorSearch struct{
|
||||
CreatedAtRange []time.Time `json:"createdAtRange" form:"createdAtRange[]"`
|
||||
Form *string `json:"form" form:"form"`
|
||||
Info *string `json:"info" form:"info"`
|
||||
request.PageInfo
|
||||
type SysErrorSearch struct {
|
||||
CreatedAtRange []time.Time `json:"createdAtRange" form:"createdAtRange[]"`
|
||||
Form *string `json:"form" form:"form"`
|
||||
Info *string `json:"info" form:"info"`
|
||||
request.PageInfo
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/common/request"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/system"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package request
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/config"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/config"
|
||||
"os"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/common/request"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/system"
|
||||
)
|
||||
|
||||
type SysLoginLogSearch struct {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/system"
|
||||
)
|
||||
|
||||
// AddMenuAuthorityInfo Add menu authority info structure
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/common/request"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/system"
|
||||
)
|
||||
|
||||
type SysOperationRecordSearch struct {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/common/request"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
common "github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
|
||||
common "git.echol.cn/loser/Go-Web-Template/server/model/common/request"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/system"
|
||||
)
|
||||
|
||||
// Register User register structure
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/common/request"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/system"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -33,8 +33,8 @@ type ImportVersionRequest struct {
|
||||
|
||||
// VersionInfo 版本信息结构体
|
||||
type VersionInfo struct {
|
||||
Name string `json:"name" binding:"required"` // 版本名称
|
||||
Code string `json:"code" binding:"required"` // 版本号
|
||||
Description string `json:"description"` // 版本描述
|
||||
ExportTime string `json:"exportTime"` // 导出时间
|
||||
Name string `json:"name" binding:"required"` // 版本名称
|
||||
Code string `json:"code" binding:"required"` // 版本号
|
||||
Description string `json:"description"` // 版本描述
|
||||
ExportTime string `json:"exportTime"` // 导出时间
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package response
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/system"
|
||||
)
|
||||
|
||||
type SysAPIResponse struct {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package response
|
||||
|
||||
import "github.com/flipped-aurora/gin-vue-admin/server/model/system"
|
||||
import "git.echol.cn/loser/Go-Web-Template/server/model/system"
|
||||
|
||||
type SysAuthorityResponse struct {
|
||||
Authority system.SysAuthority `json:"authority"`
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package response
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/system/request"
|
||||
)
|
||||
|
||||
type PolicyPathResponse struct {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package response
|
||||
|
||||
import "github.com/flipped-aurora/gin-vue-admin/server/model/system"
|
||||
import "git.echol.cn/loser/Go-Web-Template/server/model/system"
|
||||
|
||||
type SysMenusResponse struct {
|
||||
Menus []system.SysMenu `json:"menus"`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package response
|
||||
|
||||
import "github.com/flipped-aurora/gin-vue-admin/server/config"
|
||||
import "git.echol.cn/loser/Go-Web-Template/server/config"
|
||||
|
||||
type SysConfigResponse struct {
|
||||
Config config.Server `json:"config"`
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package response
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/system"
|
||||
)
|
||||
|
||||
type SysUserResponse struct {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package response
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/system"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/system/request"
|
||||
)
|
||||
|
||||
// ExportVersionResponse 导出版本响应结构体
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
)
|
||||
|
||||
type SysApi struct {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,41 +1,41 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
)
|
||||
|
||||
type SysBaseMenu struct {
|
||||
global.GVA_MODEL
|
||||
MenuLevel uint `json:"-"`
|
||||
ParentId uint `json:"parentId" gorm:"comment:父菜单ID"` // 父菜单ID
|
||||
Path string `json:"path" gorm:"comment:路由path"` // 路由path
|
||||
Name string `json:"name" gorm:"comment:路由name"` // 路由name
|
||||
Hidden bool `json:"hidden" gorm:"comment:是否在列表隐藏"` // 是否在列表隐藏
|
||||
Component string `json:"component" gorm:"comment:对应前端文件路径"` // 对应前端文件路径
|
||||
Sort int `json:"sort" gorm:"comment:排序标记"` // 排序标记
|
||||
Meta `json:"meta" gorm:"embedded"` // 附加属性
|
||||
SysAuthoritys []SysAuthority `json:"authoritys" gorm:"many2many:sys_authority_menus;"`
|
||||
Children []SysBaseMenu `json:"children" gorm:"-"`
|
||||
Parameters []SysBaseMenuParameter `json:"parameters"`
|
||||
MenuBtn []SysBaseMenuBtn `json:"menuBtn"`
|
||||
MenuLevel uint `json:"-"`
|
||||
ParentId uint `json:"parentId" gorm:"comment:父菜单ID"` // 父菜单ID
|
||||
Path string `json:"path" gorm:"comment:路由path"` // 路由path
|
||||
Name string `json:"name" gorm:"comment:路由name"` // 路由name
|
||||
Hidden bool `json:"hidden" gorm:"comment:是否在列表隐藏"` // 是否在列表隐藏
|
||||
Component string `json:"component" gorm:"comment:对应前端文件路径"` // 对应前端文件路径
|
||||
Sort int `json:"sort" gorm:"comment:排序标记"` // 排序标记
|
||||
Meta `json:"meta" gorm:"embedded"` // 附加属性
|
||||
SysAuthoritys []SysAuthority `json:"authoritys" gorm:"many2many:sys_authority_menus;"`
|
||||
Children []SysBaseMenu `json:"children" gorm:"-"`
|
||||
Parameters []SysBaseMenuParameter `json:"parameters"`
|
||||
MenuBtn []SysBaseMenuBtn `json:"menuBtn"`
|
||||
}
|
||||
|
||||
type Meta struct {
|
||||
ActiveName string `json:"activeName" gorm:"comment:高亮菜单"`
|
||||
KeepAlive bool `json:"keepAlive" gorm:"comment:是否缓存"` // 是否缓存
|
||||
KeepAlive bool `json:"keepAlive" gorm:"comment:是否缓存"` // 是否缓存
|
||||
DefaultMenu bool `json:"defaultMenu" gorm:"comment:是否是基础路由(开发中)"` // 是否是基础路由(开发中)
|
||||
Title string `json:"title" gorm:"comment:菜单名"` // 菜单名
|
||||
Icon string `json:"icon" gorm:"comment:菜单图标"` // 菜单图标
|
||||
CloseTab bool `json:"closeTab" gorm:"comment:自动关闭tab"` // 自动关闭tab
|
||||
TransitionType string `json:"transitionType" gorm:"comment:路由切换动画"` // 路由切换动画
|
||||
Title string `json:"title" gorm:"comment:菜单名"` // 菜单名
|
||||
Icon string `json:"icon" gorm:"comment:菜单图标"` // 菜单图标
|
||||
CloseTab bool `json:"closeTab" gorm:"comment:自动关闭tab"` // 自动关闭tab
|
||||
TransitionType string `json:"transitionType" gorm:"comment:路由切换动画"` // 路由切换动画
|
||||
}
|
||||
|
||||
type SysBaseMenuParameter struct {
|
||||
global.GVA_MODEL
|
||||
SysBaseMenuID uint
|
||||
Type string `json:"type" gorm:"comment:地址栏携带参数为params还是query"` // 地址栏携带参数为params还是query
|
||||
Key string `json:"key" gorm:"comment:地址栏携带参数的key"` // 地址栏携带参数的key
|
||||
Value string `json:"value" gorm:"comment:地址栏携带参数的值"` // 地址栏携带参数的值
|
||||
Key string `json:"key" gorm:"comment:地址栏携带参数的key"` // 地址栏携带参数的key
|
||||
Value string `json:"value" gorm:"comment:地址栏携带参数的值"` // 地址栏携带参数的值
|
||||
}
|
||||
|
||||
func (SysBaseMenu) TableName() string {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
)
|
||||
|
||||
// 如果含有time.Time 请自行import time包
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
)
|
||||
|
||||
// 如果含有time.Time 请自行import time包
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
)
|
||||
|
||||
// 错误日志 结构体 SysError
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
)
|
||||
|
||||
// 导出模板 结构体 SysExportTemplate
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
)
|
||||
|
||||
type JwtBlacklist struct {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
)
|
||||
|
||||
type SysLoginLog struct {
|
||||
global.GVA_MODEL
|
||||
Username string `json:"username" gorm:"column:username;comment:用户名"`
|
||||
Ip string `json:"ip" gorm:"column:ip;comment:请求ip"`
|
||||
Status bool `json:"status" gorm:"column:status;comment:登录状态"`
|
||||
ErrorMessage string `json:"errorMessage" gorm:"column:error_message;comment:错误信息"`
|
||||
Agent string `json:"agent" gorm:"column:agent;comment:代理"`
|
||||
UserID uint `json:"userId" gorm:"column:user_id;comment:用户id"`
|
||||
User SysUser `json:"user" gorm:"foreignKey:UserID"`
|
||||
Username string `json:"username" gorm:"column:username;comment:用户名"`
|
||||
Ip string `json:"ip" gorm:"column:ip;comment:请求ip"`
|
||||
Status bool `json:"status" gorm:"column:status;comment:登录状态"`
|
||||
ErrorMessage string `json:"errorMessage" gorm:"column:error_message;comment:错误信息"`
|
||||
Agent string `json:"agent" gorm:"column:agent;comment:代理"`
|
||||
UserID uint `json:"userId" gorm:"column:user_id;comment:用户id"`
|
||||
User SysUser `json:"user" gorm:"foreignKey:UserID"`
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package system
|
||||
|
||||
import "github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
import "git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
|
||||
type SysBaseMenuBtn struct {
|
||||
global.GVA_MODEL
|
||||
|
||||
@@ -4,7 +4,7 @@ package system
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
)
|
||||
|
||||
// 如果含有time.Time 请自行import time包
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
)
|
||||
|
||||
// 参数 结构体 SysParams
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/config"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/config"
|
||||
)
|
||||
|
||||
// 配置文件结构体
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/common"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/common"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
)
|
||||
|
||||
// 版本管理 结构体 SysVersion
|
||||
type SysVersion struct {
|
||||
global.GVA_MODEL
|
||||
VersionName *string `json:"versionName" form:"versionName" gorm:"comment:版本名称;column:version_name;size:255;" binding:"required"` //版本名称
|
||||
VersionCode *string `json:"versionCode" form:"versionCode" gorm:"comment:版本号;column:version_code;size:100;" binding:"required"` //版本号
|
||||
Description *string `json:"description" form:"description" gorm:"comment:版本描述;column:description;size:500;"` //版本描述
|
||||
VersionData *string `json:"versionData" form:"versionData" gorm:"comment:版本数据JSON;column:version_data;type:text;"` //版本数据
|
||||
VersionName *string `json:"versionName" form:"versionName" gorm:"comment:版本名称;column:version_name;size:255;" binding:"required"` //版本名称
|
||||
VersionCode *string `json:"versionCode" form:"versionCode" gorm:"comment:版本号;column:version_code;size:100;" binding:"required"` //版本号
|
||||
Description *string `json:"description" form:"description" gorm:"comment:版本描述;column:description;size:500;"` //版本描述
|
||||
VersionData *string `json:"versionData" form:"versionData" gorm:"comment:版本数据JSON;column:version_data;type:text;"` //版本数据
|
||||
}
|
||||
|
||||
// TableName 版本管理 SysVersion自定义表名 sys_versions
|
||||
|
||||
Reference in New Issue
Block a user