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.

10 lines
284 B

  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}}"{{if .ColumnName}} gorm:"column:{{.ColumnName}}"{{end}}`{{ end }}
  9. }