types.go 341 B

12345678910111213141516171819
  1. package template
  2. // Types defines a template for types in model
  3. var Types = `
  4. type (
  5. {{.upperStartCamelObject}}Model interface{
  6. {{.method}}
  7. }
  8. default{{.upperStartCamelObject}}Model struct {
  9. {{if .withCache}}sqlc.CachedConn{{else}}conn sqlx.SqlConn{{end}}
  10. table string
  11. }
  12. {{.upperStartCamelObject}} struct {
  13. {{.fields}}
  14. }
  15. )
  16. `