蛋蛋星球 后台端
 
 
 
 

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