config

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Default 无,原名称copy					abc => abc
	Default = StrategyType("Default")
	// FirstLetterUpper 仅首字母大写					abc => Abc
	FirstLetterUpper = StrategyType("FirstLetterUpper")
	// UnderlineToCamel 下划线转驼峰(首字母小写)		a_b_c => aBC
	UnderlineToCamel = StrategyType("UnderlineToCamel")
	// UnderlineToUpper 下划线转大写					a_b_c => ABC
	UnderlineToUpper = StrategyType("UnderlineToUpper")
)
View Source
var JavaTypePKGs = map[string]string{
	"BigDecimal": "java.math.BigDecimal",
	"Date":       "java.util.Date",
}
View Source
var MysqlToJavaTypes = map[string]string{
	"bit":        "Boolean",
	"tinyint":    "Byte",
	"smallint":   "Short",
	"mediumint":  "Integer",
	"int":        "Integer",
	"integer":    "Integer",
	"bigint":     "Long",
	"float":      "Float",
	"double":     "Double",
	"decimal":    "BigDecimal",
	"date":       "String",
	"time":       "String",
	"year":       "Short",
	"datetime":   "Date",
	"timestamp":  "Date",
	"char":       "String",
	"varchar":    "String",
	"tinytext":   "String",
	"mediumtext": "String",
	"text":       "String",
	"longtext":   "String",
	"tinyblob":   "Byte[]",
	"mediumblob": "Byte[]",
	"blob":       "Byte[]",
	"longblob":   "Byte[]",
}

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	OutputDir     string
	Verbose       bool
	IncludeTables []string
	ExcludeTables []string
	Global        *GlobalConfiguration
	Entity        *EntityConfiguration
	Mapper        *MapperConfiguration
	Repository    *RepositoryConfiguration
	XML           *XMLConfiguration
}

type EntityConfiguration

type EntityConfiguration struct {
	PKG                      string
	TableToEntityStrategy    StrategyType
	ColumnToFieldStrategy    StrategyType
	Comment                  bool
	FieldComment             bool
	Lombok                   bool
	LombokData               bool
	LombokNoArgsConstructor  bool
	LombokAllArgsConstructor bool
	LombokBuilder            bool
	Implement                bool
	Implements               []string
	Extend                   bool
	Extends                  string
	EntityClassPrefixes      []string
	EntityClassSuffixes      []string
	EntityAnnotation         bool
	TableAnnotation          bool
	IdAnnotation             bool
	ColumnAnnotation         bool
}

type GlobalConfiguration

type GlobalConfiguration struct {
	Author           string
	Date             bool
	DateLayout       string
	Copyright        bool
	CopyrightContent string
	Website          bool
	WebsiteContent   string
}

type MapperConfiguration

type MapperConfiguration struct {
	PKG              string
	NamePrefix       string
	NameSuffix       string
	Comment          bool
	MapperAnnotation bool
	MybatisPlus      bool
	TK               bool
}

type RepositoryConfiguration

type RepositoryConfiguration struct {
	PKG                  string
	NamePrefix           string
	NameSuffix           string
	Comment              bool
	RepositoryAnnotation bool
}

type StrategyType

type StrategyType string

type XMLConfiguration

type XMLConfiguration struct {
	Dir     string
	Comment bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL