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 -}}
|
2016-08-08 02:11:26 +02:00
|
|
|
{{titleCase $column.Name}} {{$column.Type}} `boil:"{{$column.Name}}" json:"{{$column.Name}}" toml:"{{$column.Name}}" yaml:"{{$column.Name}}"`
|
2016-02-23 09:27:32 +01:00
|
|
|
{{end -}}
|
|
|
|
}
|