sqlboiler/cmds/templates/struct.tpl

8 lines
307 B
Smarty
Raw Normal View History

{{- $tableName := .Table -}}
// {{titleCase $tableName}} is an object representing the database table.
type {{titleCase $tableName}} struct {
{{range $key, $value := .Columns -}}
{{titleCase $value.Name}} {{$value.Type}} `db:"{{makeDBName $tableName $value.Name}}" json:"{{$value.Name}}"`
{{end -}}
}