sqlboiler/templates/struct.tpl
Patrick O'brien b43f9c63d8 Struct generation complete, pipes to stdout
* Database driver config & flag complete
* Table flag complete, will use all tables if non specified
2016-02-23 18:27:32 +10:00

7 lines
262 B
Smarty

{{- $tableName := .TableName -}}
type {{makeGoColName $tableName}} struct {
{{range $key, $value := .TableData -}}
{{makeGoColName $value.ColName}} {{$value.ColType}} `db:"{{makeDBColName $tableName $value.ColName}}",json:"{{$value.ColName}}"`
{{end -}}
}