智慧食堂
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 line
310 B

  1. package {{.Models}}
  2. {{$ilen := len .Imports}}
  3. {{if gt $ilen 0}}
  4. import (
  5. {{range .Imports}}"{{.}}"{{end}}
  6. )
  7. {{end}}
  8. {{range .Tables}}
  9. type {{Mapper .Name}} struct {
  10. {{$table := .}}
  11. {{range .ColumnsSeq}}{{$col := $table.GetColumn .}} {{Mapper $col.Name}} {{Type $col}} {{Tag $table $col}}
  12. {{end}}
  13. }
  14. {{end}}