package dao import ( "time" "wails-app/internal/global" ) type VehicleRecord struct { global.GVA_MODEL PlateNumber string `gorm:"size:20;index:idx_vehicle_record_plate;" json:"plate_number"` // 车牌号 RFIDTag string `gorm:"size:40;column:rfid_tag" json:"rfid_tag"` // 标签 EntryTime time.Time `json:"entry_time" gorm:"default:null;index:idx_vehicle_record_entry_time;"` // 入场时间 ExitTime *time.Time `json:"exit_time" gorm:"default:null"` // 出场时间 StayTime int64 `json:"stay_time"` // 停留时间(分钟) Fee float64 `json:"fee"` // 费用 PaymentStatus string `gorm:"size:20;default:'unpaid'" json:"payment_status"` // 支付状态 PaymentEntry string `gorm:"size:32" json:"payment_entry"` PaymentMethod string `gorm:"size:20" json:"payment_method"` EntryImage string `gorm:"size:255" json:"entry_image"` // 入场图片 ExitImage string `gorm:"size:255" json:"exit_image"` // 出场图片 ParkingLotID uint `json:"parking_lot_id"` // 停车场ID ParkingSpaceID uint `json:"parking_space_id"` // 停车位ID EntryChannelID uint `gorm:"index" json:"entry_channel_id"` // 入场通道ID EntryChannelCode string `gorm:"size:50" json:"entry_channel_code"` // 入场通道编码快照 EntryChannelName string `gorm:"size:100" json:"entry_channel_name"` // 入场通道名称快照 EntryDeviceCode string `gorm:"size:50" json:"entry_device_code"` // 入场设备编码快照 EntryDeviceName string `gorm:"size:100" json:"entry_device_name"` // 入场设备名称快照 ExitChannelID uint `gorm:"index" json:"exit_channel_id"` // 出场通道ID ExitChannelCode string `gorm:"size:50" json:"exit_channel_code"` // 出场通道编码快照 ExitChannelName string `gorm:"size:100" json:"exit_channel_name"` // 出场通道名称快照 ExitDeviceCode string `gorm:"size:50" json:"exit_device_code"` // 出场设备编码快照 ExitDeviceName string `gorm:"size:100" json:"exit_device_name"` // 出场设备名称快照 } func (VehicleRecord) TableName() string { return "vehicle_record" }