2f9c936c6a
* Added inflection to all templates * Fixed broken template code (for the most part)
8 lines
361 B
Smarty
8 lines
361 B
Smarty
{{- $tableNameSingular := titleCaseSingular .Table -}}
|
|
{{- $dbName := singular .Table -}}
|
|
// {{$tableNameSingular}} is an object representing the database table.
|
|
type {{$tableNameSingular}} struct {
|
|
{{range $key, $value := .Columns -}}
|
|
{{titleCase $value.Name}} {{$value.Type}} `db:"{{makeDBName $dbName $value.Name}}" json:"{{$value.Name}}"`
|
|
{{end -}}
|
|
}
|