entm

package
v0.0.0-...-1bbae81 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Normalize

func Normalize(mm *EntityMetaModel) error

Types

type EntityMetaModel

type EntityMetaModel struct {
	Name      string
	TableName string `yaml:"tableName"`
	Fields    []*EntityMetaModelField
}

type EntityMetaModelField

type EntityMetaModelField struct {
	Name    string
	NameZh  string `yaml:"nameZh"`
	Type    string
	SQLType string `yaml:"sqlType"`
	GoType  string `yaml:"goType"`
}

type MetaModelTemplate

type MetaModelTemplate struct {
	Name           string // template name.
	Filename       string
	FilenameFormat func(ctx context.Context, mm *EntityMetaModel) string
	Skip           func(ctx context.Context, mm *EntityMetaModel) bool
}

func (MetaModelTemplate) Template

func (mt MetaModelTemplate) Template() gen.Template

Jump to

Keyboard shortcuts

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