🎨 清理多余文件,修改项目model

This commit is contained in:
2026-04-10 15:38:58 +08:00
parent 6a80fcc388
commit f106960342
221 changed files with 686 additions and 2801 deletions

View File

@@ -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列表
}

View File

@@ -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"`
}

View File

@@ -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 {

View File

@@ -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
}

View File

@@ -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"
)

View File

@@ -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"
)

View File

@@ -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 {

View File

@@ -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

View File

@@ -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 {

View File

@@ -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"
)

View File

@@ -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

View File

@@ -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"` // 导出时间
}

View File

@@ -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 {

View File

@@ -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"`

View File

@@ -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 {

View File

@@ -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"`

View File

@@ -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"`

View File

@@ -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 {

View File

@@ -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 导出版本响应结构体

View File

@@ -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 {

View File

@@ -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"
)

View File

@@ -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 {

View File

@@ -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包

View File

@@ -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包

View File

@@ -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

View File

@@ -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

View File

@@ -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 {

View File

@@ -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"`
}

View File

@@ -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

View File

@@ -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包

View File

@@ -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

View File

@@ -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"
)
// 配置文件结构体

View File

@@ -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"
)

View File

@@ -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