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.

30 lines
1.4 KiB

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