2016-08-04 07:34:46 +02:00
|
|
|
{{- $tableNameSingular := .Table.Name | singular -}}
|
|
|
|
{{- $modelName := $tableNameSingular | titleCase -}}
|
|
|
|
// {{$modelName}} is an object representing the database table.
|
|
|
|
type {{$modelName}} struct {
|
|
|
|
{{range $column := .Table.Columns -}}
|
|
|
|
{{titleCase $column.Name}} {{$column.Type}} `boil:"{{printf "%s.%s" $tableNameSingular $column.Name}}" json:"{{$column.Name}}"`
|
2016-02-23 09:27:32 +01:00
|
|
|
{{end -}}
|
|
|
|
}
|