Documentation ¶
Index ¶
- Variables
- func FormatComment(comment string) string
- func GetFieldCommentStr(comment string) string
- func GetGoStylePropertyName(columnName string) string
- func GetGoStyleTableDaoName(columnName string) string
- func IsLowerCase(r rune) bool
- func IsUpperCase(r rune) bool
- func LowerFirst(s string) string
- func ToCamelCase(s string) string
- func ToLower(s string) string
- func ToLowerCase(r rune) rune
- func ToSnakeCase(s string) string
- func ToUpper(s string) string
- func ToUpperCase(r rune) rune
- func UnExport(text string) bool
- func UpperFirst(s string) string
- type ColumnInfoModel
- type Generator
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var DocTpl = `` /* 248-byte string literal not displayed */
Functions ¶
func FormatComment ¶ added in v0.1.15
func GetFieldCommentStr ¶
func GetGoStylePropertyName ¶
func GetGoStyleTableDaoName ¶ added in v0.1.41
func IsLowerCase ¶
func IsUpperCase ¶
func LowerFirst ¶
func ToCamelCase ¶
func ToLowerCase ¶
func ToSnakeCase ¶
func ToUpperCase ¶
func UpperFirst ¶
Types ¶
type ColumnInfoModel ¶
type ColumnInfoModel struct { TableName string `gorm:"column:table_name"` ColumnName string `gorm:"column:column_name"` ColumnType string `gorm:"column:column_type"` DataType string `gorm:"column:data_type"` IsPrimaryKey int64 `gorm:"column:is_primary_key"` // 1 是主键 2 不是 ColumnComment string `gorm:"column:column_comment"` Position int64 `gorm:"column:position"` TableComment string `gorm:"column:table_comment"` }
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
type Option ¶
type Option func(g *Generator)
func WithDataBaseName ¶
func WithTablePrefix ¶ added in v0.1.26
func WithTableRegex ¶ added in v0.1.42
func WithTables ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.