package dao import "server/global" // ParkingLot 停车区域模型 type ParkingLot struct { global.GVA_MODEL LotCode string `gorm:"size:50;not null;uniqueIndex" json:"lot_code"` // 区域编码 LotName string `gorm:"size:100;not null" json:"lot_name"` // 区域名称 Capacity int `gorm:"not null" json:"capacity"` // 车位数量 Available int `gorm:"not null" json:"available"` // 可用车位 Description string `gorm:"size:200" json:"description"` // 备注 Booths []Booth `gorm:"foreignKey:ParkingLotID" json:"booths"` // 岗亭列表(一对多) Channels []Channel `gorm:"foreignKey:ParkingLotID" json:"channels"` // 通道列表(一对多) UHFReaders []UHFReader `gorm:"foreignKey:ParkingLotID" json:"uhf_readers"` // UHF读写器列表(一对多) } func (ParkingLot) TableName() string { return "parking_lot" }