unit.go 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // 自动生成模板Unit
  2. package autocode
  3. import (
  4. "github.com/flipped-aurora/gin-vue-admin/server/global"
  5. )
  6. // Unit 结构体
  7. // 如果含有time.Time 请自行import time包
  8. type Unit struct {
  9. global.GVA_MODEL
  10. UnitName string `json:"unitName" form:"unitName" gorm:"column:unit_name;comment:单位名称;type:varchar(200);"`
  11. Period string `json:"period" form:"period" gorm:"column:period;comment:期编号;type:varchar(40);"`
  12. UnitIntegral *int `json:"unitIntegral" form:"unitIntegral" gorm:"column:unit_integral;comment:现有积分;type:int"`
  13. UnitMaxIntegral *int `json:"unitMaxIntegral" form:"unitMaxIntegral" gorm:"column:unit_max_integral;comment:满分;type:int"`
  14. Remark string `json:"remark" form:"remark" gorm:"column:remark;comment:单位类型;type:varchar(600);"`
  15. //Place Place `json:"place" gorm:"foreignKey:PlaceId;references:PlaceId;comment:点位id"`
  16. //Places []Place `json:"places" gorm:"many2many:place;"`
  17. }
  18. type UnitInitIntegral struct {
  19. UnitName string `json:"unitName" form:"unitName" gorm:"column:unit_name;comment:单位名称;type:varchar(200);"`
  20. Score string `json:"score" form:"score" gorm:"column:score;comment:得分;type:varchar(40);"`
  21. Scorerate string `json:"scorerate" form:"scorerate" gorm:"column:scorerate;comment:得分率;type:varchar(40);"`
  22. Remark string `json:"remark" form:"remark" gorm:"column:remark;comment:单位类型;type:varchar(600);"`
  23. }
  24. type UnitDesc struct {
  25. UnitName string `json:"unitName" form:"unitName" gorm:"column:unit_name;comment:单位名称;type:varchar(200);"`
  26. Score string `json:"score" form:"score" gorm:"column:score;comment:得分;type:varchar(40);"`
  27. Remark string `json:"remark" form:"remark" gorm:"column:remark;comment:单位类型;type:varchar(600);"`
  28. }
  29. // TableName Unit 表名
  30. func (Unit) TableName() string {
  31. return "unit"
  32. }