Documentation ¶
Index ¶
Constants ¶
View Source
const EntityTpl = `package {{.Package}}
type {{ .ModelName }} struct {
{{ range .Fields}}
{{- if ne .Comment ""}}
// {{ .Comment}}
{{- end}}
{{ .Name}} {{.Type}} ` + "`gorm:\"{{.Meta}}\"`\n" +
`{{ end }}
}
func ({{ .ModelName}}) TableName() string {
return "{{ .TableName}}"
}
const (
{{ range .Fields}}
{{ $.ModelName }}{{ .Name}} = "{{.Column}}"
{{end}}
)
`
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MysqlGenerateConfig ¶
Click to show internal directories.
Click to hide internal directories.