完成字典模块改造
This commit is contained in:
1 parent
e04b5559bd
commit
4979fd659f
21 files changed
+1176
-635
No files matched your search
@@ -0,0 +1,35 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"go-admin/common/models"
|
||||
)
|
||||
|
||||
type SysDictData struct {
|
||||
models.ControlBy
|
||||
models.ModelTime
|
||||
|
||||
DictCode int `json:"dictCode" gorm:"primaryKey;column:dict_code;autoIncrement;comment:主键编码"`
|
||||
DictSort int `json:"dictSort" gorm:"type:bigint(20);comment:DictSort"`
|
||||
DictLabel string `json:"dictLabel" gorm:"type:varchar(128);comment:DictLabel"`
|
||||
DictValue string `json:"dictValue" gorm:"type:varchar(255);comment:DictValue"`
|
||||
DictType string `json:"dictType" gorm:"type:varchar(64);comment:DictType"`
|
||||
CssClass string `json:"cssClass" gorm:"type:varchar(128);comment:CssClass"`
|
||||
ListClass string `json:"listClass" gorm:"type:varchar(128);comment:ListClass"`
|
||||
IsDefault string `json:"isDefault" gorm:"type:varchar(8);comment:IsDefault"`
|
||||
Status string `json:"status" gorm:"type:varchar(4);comment:Status"`
|
||||
Default string `json:"default" gorm:"type:varchar(8);comment:Default"`
|
||||
Remark string `json:"remark" gorm:"type:varchar(255);comment:Remark"`
|
||||
}
|
||||
|
||||
func (SysDictData) TableName() string {
|
||||
return "sys_dict_data"
|
||||
}
|
||||
|
||||
func (e *SysDictData) Generate() models.ActiveRecord {
|
||||
o := *e
|
||||
return &o
|
||||
}
|
||||
|
||||
func (e *SysDictData) GetId() interface{} {
|
||||
return e.DictCode
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"go-admin/common/models"
|
||||
)
|
||||
|
||||
type SysDictType struct {
|
||||
models.ControlBy
|
||||
models.ModelTime
|
||||
|
||||
ID int `json:"id" gorm:"primaryKey;column:dict_id;autoIncrement;comment:主键编码"`
|
||||
DictName string `json:"dictName" gorm:"type:varchar(128);comment:DictName"`
|
||||
DictType string `json:"dictType" gorm:"type:varchar(128);comment:DictType"`
|
||||
Status string `json:"status" gorm:"type:varchar(4);comment:Status"`
|
||||
Remark string `json:"remark" gorm:"type:varchar(255);comment:Remark"`
|
||||
}
|
||||
|
||||
func (SysDictType) TableName() string {
|
||||
return "sys_dict_type"
|
||||
}
|
||||
|
||||
func (e *SysDictType) Generate() models.ActiveRecord {
|
||||
o := *e
|
||||
return &o
|
||||
}
|
||||
|
||||
func (e *SysDictType) GetId() interface{} {
|
||||
return e.ID
|
||||
}
|
||||
Reference in new issue
Block a user