package dao import "wails-app/internal/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"` // 车位数量 Occupied int `gorm:"not null;default:0" json:"occupied"` // 当前占用车位 Available int `gorm:"not null" json:"available"` // 可用车位 AllowTemporaryWhenFull bool `gorm:"column:allow_temporary_when_full;not null;default:false" json:"allow_temporary_when_full"` // 满位时允许临时车入场 AllowMonthlyWhenFull bool `gorm:"column:allow_monthly_when_full;not null;default:true" json:"allow_monthly_when_full"` // 满位时允许有效月租车入场 AllowVIPWhenFull bool `gorm:"column:allow_vip_when_full;not null;default:true" json:"allow_vip_when_full"` // 满位时允许有效 VIP 车入场 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" }