增加字典管理功能
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
package request
|
||||
|
||||
import "gin-vue-admin/model"
|
||||
|
||||
type SysDictionarySearch struct{
|
||||
model.SysDictionary
|
||||
PageInfo
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package request
|
||||
|
||||
import "gin-vue-admin/model"
|
||||
|
||||
type SysDictionaryDetailSearch struct{
|
||||
model.SysDictionaryDetail
|
||||
PageInfo
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// 自动生成模板SysDictionary
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/jinzhu/gorm"
|
||||
)
|
||||
|
||||
// 如果含有time.Time 请自行import time包
|
||||
type SysDictionary struct {
|
||||
gorm.Model
|
||||
Name string `json:"name" form:"name" gorm:"column:name;comment:'字典名(中)'"`
|
||||
Type string `json:"type" form:"type" gorm:"column:type;comment:'字典名(英)'"`
|
||||
Status *bool `json:"status" form:"status" gorm:"column:status;comment:'状态'"`
|
||||
Desc string `json:"desc" form:"desc" gorm:"column:desc;comment:'描述'"`
|
||||
SysDictionaryDetails []SysDictionaryDetail `json:"sysDictionaryDetails" form:"sysDictionaryDetails"`
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// 自动生成模板SysDictionaryDetail
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/jinzhu/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:'关联标记'"`
|
||||
}
|
||||
Reference in New Issue
Block a user