You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.5 KiB

3 years ago
  1. package system
  2. import "errors"
  3. // AutoCodeStruct 初始版本自动化代码工具
  4. type AutoCodeStruct struct {
  5. StructName string `json:"structName"` // Struct名称
  6. TableName string `json:"tableName"` // 表名
  7. PackageName string `json:"packageName"` // 文件名称
  8. HumpPackageName string `json:"humpPackageName"` // go文件名称
  9. Abbreviation string `json:"abbreviation"` // Struct简称
  10. Description string `json:"description"` // Struct中文名称
  11. AutoCreateApiToSql bool `json:"autoCreateApiToSql"` // 是否自动创建api
  12. AutoMoveFile bool `json:"autoMoveFile"` // 是否自动移动文件
  13. Fields []*Field `json:"fields"`
  14. DictTypes []string `json:"-"`
  15. }
  16. type Field struct {
  17. FieldName string `json:"fieldName"` // Field名
  18. FieldDesc string `json:"fieldDesc"` // 中文名
  19. FieldType string `json:"fieldType"` // Field数据类型
  20. FieldJson string `json:"fieldJson"` // FieldJson
  21. DataTypeLong string `json:"dataTypeLong"` // 数据库字段长度
  22. Comment string `json:"comment"` // 数据库字段描述
  23. ColumnName string `json:"columnName"` // 数据库字段
  24. FieldSearchType string `json:"fieldSearchType"` // 搜索条件
  25. DictType string `json:"dictType"` // 字典
  26. }
  27. var AutoMoveErr error = errors.New("创建代码成功并移动文件成功")