智盟项目
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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