format🥚 :调整主键key和自增长tag

This commit is contained in:
zhangwenjian
2021-02-24 14:22:33 +08:00
parent 561566f172
commit f22f654c91
17 changed files with 21 additions and 21 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ import (
)
type SysDepts struct {
DeptId int `json:"deptId" gorm:"primary_key;auto_increment;"` //部门编码
DeptId int `json:"deptId" gorm:"primaryKey;autoIncrement;"` //部门编码
ParentId int `json:"parentId" gorm:""` //上级部门
DeptPath string `json:"deptPath" gorm:"size:255;"` //
DeptName string `json:"deptName" gorm:"size:128;"` //部门名称
+2 -2
View File
@@ -9,7 +9,7 @@ import (
)
type Menu struct {
MenuId int `json:"menuId" gorm:"primary_key;AUTO_INCREMENT"`
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;"`
@@ -46,7 +46,7 @@ type MenuLable struct {
}
type Menus struct {
MenuId int `json:"menuId" gorm:"column:menu_id;primary_key;"`
MenuId int `json:"menuId" gorm:"column:menu_id;primaryKey;autoIncrement;"`
MenuName string `json:"menuName" gorm:"column:menu_name"`
Title string `json:"title" gorm:"column:title"`
Icon string `json:"icon" gorm:"column:icon"`
+1 -1
View File
@@ -6,7 +6,7 @@ import (
)
type Post struct {
PostId int `gorm:"primary_key;AUTO_INCREMENT" json:"postId"` //岗位编号
PostId int `gorm:"primaryKey;autoIncrement" json:"postId"` //岗位编号
PostName string `gorm:"size:128;" json:"postName"` //岗位名称
PostCode string `gorm:"size:128;" json:"postCode"` //岗位代码
Sort int `gorm:"" json:"sort"` //岗位排序
+1 -1
View File
@@ -10,7 +10,7 @@ import (
)
type SysRole struct {
RoleId int `json:"roleId" gorm:"primary_key;AUTO_INCREMENT"` // 角色编码
RoleId int `json:"roleId" gorm:"primaryKey;autoIncrement"` // 角色编码
RoleName string `json:"roleName" gorm:"size:128;"` // 角色名称
Status string `json:"status" gorm:"size:4;"` //
RoleKey string `json:"roleKey" gorm:"size:128;"` //角色代码
+1 -1
View File
@@ -3,7 +3,7 @@ package models
import "go-admin/common/models"
type SysDept struct {
DeptId int `json:"deptId" gorm:"primary_key;auto_increment;"` //部门编码
DeptId int `json:"deptId" gorm:"primaryKey;autoIncrement;"` //部门编码
ParentId int `json:"parentId" gorm:""` //上级部门
DeptPath string `json:"deptPath" gorm:"size:255;"` //
DeptName string `json:"deptName" gorm:"size:128;"` //部门名称
+2 -2
View File
@@ -3,7 +3,7 @@ package models
import "go-admin/common/models"
type SysMenu struct {
MenuId int `json:"menuId" gorm:"primary_key;AUTO_INCREMENT"`
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;"`
@@ -29,7 +29,7 @@ type SysMenu struct {
}
type SysMenus struct {
MenuId int `json:"menuId" gorm:"column:menu_id;primary_key;"`
MenuId int `json:"menuId" gorm:"column:menu_id;primaryKey;autoIncrement;"`
MenuName string `json:"menuName" gorm:"column:menu_name"`
Title string `json:"title" gorm:"column:title"`
Icon string `json:"icon" gorm:"column:icon"`
+1 -1
View File
@@ -6,7 +6,7 @@ import (
)
type SysContent struct {
Id int `json:"id" gorm:"type:int(11);primary_key;auto_increment"` // id
Id int `json:"id" gorm:"type:int(11);primaryKey;autoIncrement"` // id
CateId string `json:"cateId" gorm:"type:int(11);"` // 分类id
Name string `json:"name" gorm:"type:varchar(255);"` // 名称
Status string `json:"status" gorm:"type:int(1);"` // 状态
+1 -1
View File
@@ -9,7 +9,7 @@ import (
)
type SysJob struct {
JobId int `json:"jobId" gorm:"primary_key;AUTO_INCREMENT"` // 编码
JobId int `json:"jobId" gorm:"primaryKey;autoIncrement"` // 编码
JobName string `json:"jobName" gorm:"size:255;"` // 名称
JobGroup string `json:"jobGroup" gorm:"size:255;"` // 任务分组
JobType int `json:"jobType" gorm:"size:1;"` // 任务类型
+3 -3
View File
@@ -12,9 +12,9 @@ import (
type RoleMenu struct {
RoleId int `gorm:""`
MenuId int `gorm:""`
RoleName string `gorm:"size:128)"`
CreateBy string `gorm:"size:128)"`
UpdateBy string `gorm:"size:128)"`
RoleName string `gorm:"size:128"`
CreateBy string `gorm:"size:128"`
UpdateBy string `gorm:"size:128"`
}
func (RoleMenu) TableName() string {
+1 -1
View File
@@ -3,7 +3,7 @@ package system
import "go-admin/common/models"
type SysPost struct {
PostId int `gorm:"primary_key;AUTO_INCREMENT" json:"postId"` //岗位编号
PostId int `gorm:"primaryKey;autoIncrement" json:"postId"` //岗位编号
PostName string `gorm:"size:128;" json:"postName"` //岗位名称
PostCode string `gorm:"size:128;" json:"postCode"` //岗位代码
Sort int `gorm:"" json:"sort"` //岗位排序
+1 -1
View File
@@ -3,7 +3,7 @@ package system
import "go-admin/common/models"
type SysRole struct {
RoleId int `json:"roleId" gorm:"primary_key;AUTO_INCREMENT"` // 角色编码
RoleId int `json:"roleId" gorm:"primaryKey;autoIncrement"` // 角色编码
RoleName string `json:"roleName" gorm:"size:128;"` // 角色名称
Status string `json:"status" gorm:"size:4;"` //
RoleKey string `json:"roleKey" gorm:"size:128;"` //角色代码
+1 -1
View File
@@ -39,7 +39,7 @@ type LoginM struct {
}
type SysUserId struct {
UserId int `gorm:"primary_key;AUTO_INCREMENT" json:"userId"` // 编码
UserId int `gorm:"primaryKey;autoIncrement" json:"userId"` // 编码
}
type SysUserB struct {
+1 -1
View File
@@ -6,7 +6,7 @@ import (
)
type SysColumns struct {
ColumnId int `gorm:"primary_key;auto_increment" json:"columnId"`
ColumnId int `gorm:"primaryKey;autoIncrement" json:"columnId"`
TableId int `gorm:"" json:"tableId"`
ColumnName string `gorm:"size:128;" json:"columnName"`
ColumnComment string `gorm:"column:column_comment;size:128;" json:"columnComment"`
+1 -1
View File
@@ -8,7 +8,7 @@ import (
)
type SysTables struct {
TableId int `gorm:"primary_key;auto_increment" json:"tableId"` //表编码
TableId int `gorm:"primaryKey;autoIncrement" json:"tableId"` //表编码
TBName string `gorm:"column:table_name;size:255;" json:"tableName"` //表名称
TableComment string `gorm:"size:255;" json:"tableComment"` //表备注
ClassName string `gorm:"size:255;" json:"className"` //类名