gormv2升级 第一阶段
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/jinzhu/gorm"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// file struct, 文件结构体
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/jinzhu/gorm"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type ExaCustomer struct {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/jinzhu/gorm"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type ExaFileUploadAndDownload struct {
|
||||
|
@@ -2,7 +2,7 @@ package response
|
||||
|
||||
type PageResult struct {
|
||||
List interface{} `json:"list"`
|
||||
Total int `json:"total"`
|
||||
Total int64 `json:"total"`
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"pageSize"`
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/jinzhu/gorm"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type SysApi struct {
|
||||
|
@@ -11,7 +11,7 @@ type SysAuthority struct {
|
||||
AuthorityId string `json:"authorityId" gorm:"not null;unique;primary_key" gorm:"comment:'角色ID'"`
|
||||
AuthorityName string `json:"authorityName" gorm:"comment:'角色名'"`
|
||||
ParentId string `json:"parentId" gorm:"comment:'父角色ID'"`
|
||||
DataAuthorityId []SysAuthority `json:"dataAuthorityId" gorm:"many2many:sys_data_authority_id;association_jointable_foreignkey:data_authority_id"`
|
||||
Children []SysAuthority `json:"children"`
|
||||
DataAuthorityId []SysAuthority `json:"dataAuthorityId" gorm:"many2many:sys_data_authority_id"`
|
||||
Children []SysAuthority `json:"children" gorm:"-"`
|
||||
SysBaseMenus []SysBaseMenu `json:"menus" gorm:"many2many:sys_authority_menus;"`
|
||||
}
|
||||
|
@@ -4,8 +4,8 @@ type SysMenu struct {
|
||||
SysBaseMenu
|
||||
MenuId string `json:"menuId" gorm:"comment:'菜单ID'"`
|
||||
AuthorityId string `json:"-" gorm:"comment:'角色ID'"`
|
||||
Children []SysMenu `json:"children"`
|
||||
Parameters []SysBaseMenuParameter `json:"parameters" gorm:"ForeignKey:MenuId"`
|
||||
Children []SysMenu `json:"children" gorm:"-"`
|
||||
Parameters []SysBaseMenuParameter `json:"parameters" gorm:"foreignKey:SysBaseMenuID;references:MenuId"`
|
||||
}
|
||||
|
||||
func (s SysMenu) TableName() string {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/jinzhu/gorm"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type SysBaseMenu struct {
|
||||
@@ -15,7 +15,7 @@ type SysBaseMenu struct {
|
||||
Sort int `json:"sort" gorm:"comment:'排序标记'"`
|
||||
Meta `json:"meta" gorm:"comment:'附加属性'"`
|
||||
SysAuthoritys []SysAuthority `json:"authoritys" gorm:"many2many:sys_authority_menus;"`
|
||||
Children []SysBaseMenu `json:"children"`
|
||||
Children []SysBaseMenu `json:"children" gorm:"-"`
|
||||
Parameters []SysBaseMenuParameter `json:"parameters"`
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ type Meta struct {
|
||||
|
||||
type SysBaseMenuParameter struct {
|
||||
gorm.Model
|
||||
SysBaseMenuId uint
|
||||
SysBaseMenuID uint
|
||||
Type string `json:"type" gorm:"commit:'地址栏携带参数为params还是query'"`
|
||||
Key string `json:"key" gorm:"commit:'地址栏携带参数的key'"`
|
||||
Value string `json:"value" gorm:"commit:'地址栏携带参数的值'"`
|
||||
|
@@ -2,7 +2,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/jinzhu/gorm"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// 如果含有time.Time 请自行import time包
|
||||
|
@@ -2,15 +2,15 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/jinzhu/gorm"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// 如果含有time.Time 请自行import time包
|
||||
type SysDictionaryDetail struct {
|
||||
gorm.Model
|
||||
Label string `json:"label" form:"label" gorm:"column:label;comment:'展示值'"`
|
||||
Value int `json:"value" form:"value" gorm:"column:value;comment:'字典值'"`
|
||||
Status *bool `json:"status" form:"status" gorm:"column:status;comment:'启用状态'"`
|
||||
Sort int `json:"sort" form:"sort" gorm:"column:sort;comment:'排序标记'"`
|
||||
SysDictionaryID int `json:"sysDictionaryID" form:"sysDictionaryID" gorm:"column:sys_dictionary_id;comment:'关联标记'"`
|
||||
}
|
||||
gorm.Model
|
||||
Label string `json:"label" form:"label" gorm:"column:label;comment:'展示值'"`
|
||||
Value int `json:"value" form:"value" gorm:"column:value;comment:'字典值'"`
|
||||
Status *bool `json:"status" form:"status" gorm:"column:status;comment:'启用状态'"`
|
||||
Sort int `json:"sort" form:"sort" gorm:"column:sort;comment:'排序标记'"`
|
||||
SysDictionaryID int `json:"sysDictionaryID" form:"sysDictionaryID" gorm:"column:sys_dictionary_id;comment:'关联标记'"`
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/jinzhu/gorm"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type JwtBlacklist struct {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/jinzhu/gorm"
|
||||
"gorm.io/gorm"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/jinzhu/gorm"
|
||||
"github.com/satori/go.uuid"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type SysUser struct {
|
||||
@@ -12,6 +12,6 @@ type SysUser struct {
|
||||
Password string `json:"-" gorm:"comment:'用户登录密码'"`
|
||||
NickName string `json:"nickName" gorm:"default:'系统用户';comment:'用户昵称'" `
|
||||
HeaderImg string `json:"headerImg" gorm:"default:'http://qmplusimg.henrongyi.top/head.png';comment:'用户头像'"`
|
||||
Authority SysAuthority `json:"authority" gorm:"ForeignKey:AuthorityId;AssociationForeignKey:AuthorityId;comment:'用户角色'"`
|
||||
Authority SysAuthority `json:"authority" gorm:"foreignKey:AuthorityId;references:AuthorityId;comment:'用户角色'"`
|
||||
AuthorityId string `json:"authorityId" gorm:"default:888;comment:'用户角色ID'"`
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/jinzhu/gorm"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// 工作流属性表
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package model
|
||||
|
||||
import "github.com/jinzhu/gorm"
|
||||
import "gorm.io/gorm"
|
||||
|
||||
// 工作流流转表
|
||||
type SysWorkFlowProcess struct {
|
||||
|
Reference in New Issue
Block a user