skeleton/internal/database/templates/postgres.querytype.go.tpl
2019-05-14 14:11:03 +02:00

13 lines
285 B
Smarty

{{- $table := (schema .Schema .Table.TableName) -}}
{{- if .Comment -}}
// {{ .Comment }}
{{- else -}}
// {{ .Name }} represents a row from '{{ $table }}'.
{{- end }}
type {{ .Name }} struct {
{{- range .Fields }}
{{ .Name }} {{ retype .Type }} // {{ .Col.ColumnName }}
{{- end }}
}