sqlboiler/cmds/templates/struct.tpl
Patrick O'brien b5409c7332 Fixed assign defaultRun bug, fixed "all" order
* Organized files better
* More comments
2016-02-29 19:39:49 +10:00

8 lines
340 B
Smarty

{{- $tableName := .TableName -}}
// {{makeGoColName $tableName}} is an object representing the database table.
type {{makeGoColName $tableName}} struct {
{{range $key, $value := .TableData -}}
{{makeGoColName $value.ColName}} {{$value.ColType}} `db:"{{makeDBColName $tableName $value.ColName}}" json:"{{$value.ColName}}"`
{{end -}}
}