2016-03-02 05:05:25 +01:00
|
|
|
{{- $tableName := .Table -}}
|
2016-03-01 17:34:57 +01:00
|
|
|
// {{titleCase $tableName}} is an object representing the database table.
|
|
|
|
type {{titleCase $tableName}} struct {
|
2016-03-02 05:05:25 +01:00
|
|
|
{{range $key, $value := .Columns -}}
|
2016-03-01 17:34:57 +01:00
|
|
|
{{titleCase $value.Name}} {{$value.Type}} `db:"{{makeDBName $tableName $value.Name}}" json:"{{$value.Name}}"`
|
2016-02-23 09:27:32 +01:00
|
|
|
{{end -}}
|
|
|
|
}
|