format🥚 代码格式化

This commit is contained in:
zhangwenjian committed 2021-05-31 18:10:23 +08:00
1 parent a7cc943b8e
commit a54d4ba0c1
96 files changed
+143 -151

No files matched your search

+1 -1
View File
@@ -13,4 +13,4 @@ type CasbinRule struct {
func (CasbinRule) TableName() string {
return "sys_casbin_rule"
}
}
+1 -1
View File
@@ -78,4 +78,4 @@ func DataScopes(tableName string, userId int) func(db *gorm.DB) *gorm.DB {
}
return db
}
}
}
+24 -24
View File
@@ -9,29 +9,29 @@ import (
)
type Menu struct {
MenuId int `json:"menuId" gorm:"primaryKey;autoIncrement"`
MenuName string `json:"menuName" gorm:"size:128;"`
Title string `json:"title" gorm:"size:128;"`
Icon string `json:"icon" gorm:"size:128;"`
Path string `json:"path" gorm:"size:128;"`
Paths string `json:"paths" gorm:"size:128;"`
MenuType string `json:"menuType" gorm:"size:1;"`
Action string `json:"action" gorm:"size:16;"`
Permission string `json:"permission" gorm:"size:255;"`
ParentId int `json:"parentId" gorm:"size:11;"`
NoCache bool `json:"noCache" gorm:"size:8;"`
Breadcrumb string `json:"breadcrumb" gorm:"size:255;"`
Component string `json:"component" gorm:"size:255;"`
Sort int `json:"sort" gorm:"size:4;"`
Visible string `json:"visible" gorm:"size:1;"`
CreateBy string `json:"createBy" gorm:"size:128;"`
UpdateBy string `json:"updateBy" gorm:"size:128;"`
IsFrame string `json:"isFrame" gorm:"size:1;DEFAULT:0;"`
DataScope string `json:"dataScope" gorm:"-"`
Params string `json:"params" gorm:"-"`
RoleId int `gorm:"-"`
Children []Menu `json:"children" gorm:"-"`
IsSelect bool `json:"is_select" gorm:"-"`
MenuId int `json:"menuId" gorm:"primaryKey;autoIncrement"`
MenuName string `json:"menuName" gorm:"size:128;"`
Title string `json:"title" gorm:"size:128;"`
Icon string `json:"icon" gorm:"size:128;"`
Path string `json:"path" gorm:"size:128;"`
Paths string `json:"paths" gorm:"size:128;"`
MenuType string `json:"menuType" gorm:"size:1;"`
Action string `json:"action" gorm:"size:16;"`
Permission string `json:"permission" gorm:"size:255;"`
ParentId int `json:"parentId" gorm:"size:11;"`
NoCache bool `json:"noCache" gorm:"size:8;"`
Breadcrumb string `json:"breadcrumb" gorm:"size:255;"`
Component string `json:"component" gorm:"size:255;"`
Sort int `json:"sort" gorm:"size:4;"`
Visible string `json:"visible" gorm:"size:1;"`
CreateBy string `json:"createBy" gorm:"size:128;"`
UpdateBy string `json:"updateBy" gorm:"size:128;"`
IsFrame string `json:"isFrame" gorm:"size:1;DEFAULT:0;"`
DataScope string `json:"dataScope" gorm:"-"`
Params string `json:"params" gorm:"-"`
RoleId int `gorm:"-"`
Children []Menu `json:"children" gorm:"-"`
IsSelect bool `json:"is_select" gorm:"-"`
models.ModelTime
}
@@ -159,4 +159,4 @@ func InitPaths(tx *gorm.DB, menu *Menu) (err error) {
}
tx.Table("sys_menu").Where("menu_id = ?", menu.MenuId).Update("paths", menu.Paths)
return
}
}
+1 -1
View File
@@ -238,4 +238,4 @@ type MenuIdList struct {
// }
//
// return true, nil
//}
//}
+1 -1
View File
@@ -8,4 +8,4 @@ type SysRoleDept struct {
func (SysRoleDept) TableName() string {
return "sys_role_dept"
}
}
+1 -1
View File
@@ -168,4 +168,4 @@ func (rm *RoleMenu) Delete(tx *gorm.DB, RoleId string, MenuID string) (bool, err
}
return true, nil
}
}
+1 -1
View File
@@ -27,4 +27,4 @@ func (e *SysConfig) Generate() models.ActiveRecord {
func (e *SysConfig) GetId() interface{} {
return e.Id
}
}
+1 -1
View File
@@ -30,4 +30,4 @@ func (e *SysDept) Generate() models.ActiveRecord {
func (e *SysDept) GetId() interface{} {
return e.DeptId
}
}
+1 -1
View File
@@ -32,4 +32,4 @@ func (e *SysDictData) Generate() models.ActiveRecord {
func (e *SysDictData) GetId() interface{} {
return e.DictCode
}
}
+1 -1
View File
@@ -26,4 +26,4 @@ func (e *SysDictType) Generate() models.ActiveRecord {
func (e *SysDictType) GetId() interface{} {
return e.ID
}
}
+1 -1
View File
@@ -69,4 +69,4 @@ func SaveLoginLog(message storage.Messager) (err error) {
return err
}
return nil
}
}
+1 -1
View File
@@ -63,4 +63,4 @@ func (e *SysMenu) Generate() models.ActiveRecord {
func (e *SysMenu) GetId() interface{} {
return e.MenuId
}
}
+1 -1
View File
@@ -82,4 +82,4 @@ func SaveOperaLog(message storage.Messager) (err error) {
return err
}
return nil
}
}
+1 -1
View File
@@ -27,4 +27,4 @@ func (e *SysPost) Generate() models.ActiveRecord {
func (e *SysPost) GetId() interface{} {
return e.PostId
}
}
+1 -1
View File
@@ -31,4 +31,4 @@ func (e *SysRole) Generate() models.ActiveRecord {
func (e *SysRole) GetId() interface{} {
return e.RoleId
}
}
+1 -1
View File
@@ -74,4 +74,4 @@ func (e *SysUser) AfterFind(_ *gorm.DB) error {
e.PostIds = []int{e.PostId}
e.RoleIds = []int{e.RoleId}
return nil
}
}