2020-04-04 13:39:07 +00:00
|
|
|
package model
|
2020-03-22 15:18:22 +00:00
|
|
|
|
2020-11-08 04:47:55 +00:00
|
|
|
import "errors"
|
|
|
|
|
|
2020-03-30 06:21:51 +00:00
|
|
|
// 初始版本自动化代码工具
|
2020-03-22 15:18:22 +00:00
|
|
|
type AutoCodeStruct struct {
|
2021-04-30 06:14:00 +00:00
|
|
|
StructName string `json:"structName"` // Struct名称
|
|
|
|
|
TableName string `json:"tableName"` // 表名
|
|
|
|
|
PackageName string `json:"packageName"` // 文件名称
|
2021-06-17 04:12:31 +00:00
|
|
|
HumpPackageName string `json:"humpPackageName"` // go文件名称
|
2021-04-30 06:14:00 +00:00
|
|
|
Abbreviation string `json:"abbreviation"` // Struct简称
|
|
|
|
|
Description string `json:"description"` // Struct中文名称
|
|
|
|
|
AutoCreateApiToSql bool `json:"autoCreateApiToSql"` // 是否自动创建api
|
|
|
|
|
AutoMoveFile bool `json:"autoMoveFile"` // 是否自动移动文件
|
2021-03-24 06:12:07 +00:00
|
|
|
Fields []*Field `json:"fields"`
|
2020-03-22 15:18:22 +00:00
|
|
|
}
|
|
|
|
|
|
2020-03-29 16:06:48 +00:00
|
|
|
type Field struct {
|
2021-04-30 06:14:00 +00:00
|
|
|
FieldName string `json:"fieldName"` // Field名
|
|
|
|
|
FieldDesc string `json:"fieldDesc"` // 中文名
|
|
|
|
|
FieldType string `json:"fieldType"` // Field数据类型
|
|
|
|
|
FieldJson string `json:"fieldJson"` // FieldJson
|
|
|
|
|
DataType string `json:"dataType"` // 数据库字段类型
|
|
|
|
|
DataTypeLong string `json:"dataTypeLong"` // 数据库字段长度
|
|
|
|
|
Comment string `json:"comment"` // 数据库字段描述
|
|
|
|
|
ColumnName string `json:"columnName"` // 数据库字段
|
|
|
|
|
FieldSearchType string `json:"fieldSearchType"` // 搜索条件
|
|
|
|
|
DictType string `json:"dictType"` // 字典
|
2020-06-11 03:40:21 +00:00
|
|
|
}
|
2020-11-08 04:47:55 +00:00
|
|
|
|
|
|
|
|
var AutoMoveErr error = errors.New("创建代码成功并移动文件成功")
|