sqlboiler/templates/struct.tpl
Patrick O'brien 403951940f Added comments to all tpl statements
* Added new statements
* Modified existing statements
* (TODO: FINISH STATEMENT IMPLEMENTATIONS)
2016-02-29 12:52:17 +10:00

7 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 -}}
}