mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 02:04:09 +00:00
refactor🎨:调整管理员和字典相关结构体字段顺序
This commit is contained in:
@@ -5,9 +5,6 @@ import (
|
||||
)
|
||||
|
||||
type SysDictData struct {
|
||||
models.ControlBy
|
||||
models.ModelTime
|
||||
|
||||
DictCode int `json:"dictCode" gorm:"primaryKey;column:dict_code;autoIncrement;comment:主键编码"`
|
||||
DictSort int `json:"dictSort" gorm:"size:20;comment:DictSort"`
|
||||
DictLabel string `json:"dictLabel" gorm:"size:128;comment:DictLabel"`
|
||||
@@ -19,6 +16,8 @@ type SysDictData struct {
|
||||
Status string `json:"status" gorm:"size:4;comment:Status"`
|
||||
Default string `json:"default" gorm:"size:8;comment:Default"`
|
||||
Remark string `json:"remark" gorm:"size:255;comment:Remark"`
|
||||
models.ControlBy
|
||||
models.ModelTime
|
||||
}
|
||||
|
||||
func (SysDictData) TableName() string {
|
||||
|
||||
@@ -5,14 +5,13 @@ import (
|
||||
)
|
||||
|
||||
type SysDictType struct {
|
||||
models.ControlBy
|
||||
models.ModelTime
|
||||
|
||||
ID int `json:"id" gorm:"primaryKey;column:dict_id;autoIncrement;comment:主键编码"`
|
||||
DictName string `json:"dictName" gorm:"size:128;comment:DictName"`
|
||||
DictType string `json:"dictType" gorm:"size:128;comment:DictType"`
|
||||
Status string `json:"status" gorm:"size:4;comment:Status"`
|
||||
Remark string `json:"remark" gorm:"size:255;comment:Remark"`
|
||||
models.ControlBy
|
||||
models.ModelTime
|
||||
}
|
||||
|
||||
func (SysDictType) TableName() string {
|
||||
|
||||
@@ -7,8 +7,6 @@ import (
|
||||
)
|
||||
|
||||
type SysUser struct {
|
||||
models.ControlBy
|
||||
models.ModelTime
|
||||
UserId int `gorm:"primaryKey;autoIncrement;comment:编码" json:"userId"`
|
||||
Username string `json:"username" gorm:"size:64;comment:用户名"`
|
||||
Password string `json:"-" gorm:"size:128;comment:密码"`
|
||||
@@ -27,6 +25,8 @@ type SysUser struct {
|
||||
PostIds []int `json:"postIds" gorm:"-"`
|
||||
RoleIds []int `json:"roleIds" gorm:"-"`
|
||||
Dept *SysDept `json:"dept"`
|
||||
models.ControlBy
|
||||
models.ModelTime
|
||||
}
|
||||
|
||||
func (SysUser) TableName() string {
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
package models
|
||||
|
||||
type SysSetting struct {
|
||||
SettingsId int `json:"settings_id" gorm:"primary_key;AUTO_INCREMENT"`
|
||||
Name string `json:"name" gorm:"type:varchar(256);"`
|
||||
Logo string `json:"logo" gorm:"type:varchar(256);"`
|
||||
ModelTime
|
||||
}
|
||||
|
||||
func (SysSetting) TableName() string {
|
||||
return "sys_setting"
|
||||
}
|
||||
Reference in New Issue
Block a user