model.go.tpl 305 B

1234567891011
  1. // 自动生成模板{{.StructName}}
  2. package model
  3. import (
  4. "github.com/jinzhu/gorm"
  5. )
  6. type {{.StructName}} struct {
  7. gorm.Model {{range .Fields}}
  8. {{.FieldName}} {{.FieldType}} `json:"{{.FieldJson}}" form:"{{.FieldJson}}" {{if .ColumnName}} gorm:"column:{{.ColumnName}}"{{end}}`{{ end }}
  9. }