自动化代码可选不使用官方global.Model结构 (#1637)
* 自动化代码可自行选择默认结构 * 调整自动化模板 * 增加自动化模板中对timer的处理
This commit is contained in:
@@ -13,4 +13,5 @@ type Column struct {
|
||||
ColumnName string `json:"columnName" gorm:"column:column_name"`
|
||||
DataTypeLong string `json:"dataTypeLong" gorm:"column:data_type_long"`
|
||||
ColumnComment string `json:"columnComment" gorm:"column:column_comment"`
|
||||
PrimaryKey bool `json:"primaryKey" gorm:"column:primary_key"`
|
||||
}
|
||||
|
@@ -20,8 +20,11 @@ type AutoCodeStruct struct {
|
||||
AutoCreateResource bool `json:"autoCreateResource"` // 是否自动创建资源标识
|
||||
AutoMoveFile bool `json:"autoMoveFile"` // 是否自动移动文件
|
||||
BusinessDB string `json:"businessDB"` // 业务数据库
|
||||
Fields []*Field `json:"fields,omitempty"`
|
||||
HasTimer bool
|
||||
GvaModel bool `json:"gvaModel"` // 是否使用gva默认Model
|
||||
Fields []*Field `json:"fields"`
|
||||
PrimaryField *Field `json:"primaryField"`
|
||||
HasTimer bool `json:"-"`
|
||||
HasSearchTimer bool `json:"-"`
|
||||
DictTypes []string `json:"-"`
|
||||
Package string `json:"package"`
|
||||
PackageT string `json:"-"`
|
||||
@@ -67,6 +70,7 @@ type Field struct {
|
||||
ErrorText string `json:"errorText"` // 校验失败文字
|
||||
Clearable bool `json:"clearable"` // 是否可清空
|
||||
Sort bool `json:"sort"` // 是否增加排序
|
||||
PrimaryKey bool `json:"primaryKey"` // 是否主键
|
||||
}
|
||||
|
||||
var ErrAutoMove error = errors.New("创建代码成功并移动文件成功")
|
||||
|
Reference in New Issue
Block a user