parking_lot.go 590 B

12345678910111213141516
  1. package dao
  2. import "server/global"
  3. type ParkingLot struct {
  4. global.GVA_MODEL
  5. LotCode string `gorm:"size:50;not null;uniqueIndex" json:"lot_code"` // 区域编码
  6. LotName string `gorm:"size:100;not null" json:"lot_name"` // 区域名称
  7. Capacity int `gorm:"not null" json:"capacity"` // 车位数量
  8. Available int `gorm:"not null" json:"available"` // 可用车位
  9. Description string `gorm:"size:200" json:"description"` // 备注
  10. }
  11. func (ParkingLot) TableName() string {
  12. return "parking_lot"
  13. }