|
@@ -14,10 +14,10 @@ type Vehicle struct {
|
|
|
VehicleColor string `gorm:"size:20" json:"vehicle_color"` // 车辆颜色
|
|
VehicleColor string `gorm:"size:20" json:"vehicle_color"` // 车辆颜色
|
|
|
OwnerId *uint `json:"owner_id"` // 车主id,可为空(临时车辆)
|
|
OwnerId *uint `json:"owner_id"` // 车主id,可为空(临时车辆)
|
|
|
Owner *Owner `gorm:"foreignKey:OwnerId" json:"owner"`
|
|
Owner *Owner `gorm:"foreignKey:OwnerId" json:"owner"`
|
|
|
- LastEntryTime time.Time `json:"last_entry_time"` // 最近入场时间
|
|
|
|
|
- LastExitTime time.Time `json:"last_exit_time"` // 最近出场时间
|
|
|
|
|
- TotalStayTime int64 `json:"total_stay_time"` // 总停留时间
|
|
|
|
|
- TotalFee float64 `json:"total_fee"` // 总费用
|
|
|
|
|
|
|
+ LastEntryTime time.Time `json:"last_entry_time" gorm:"default:null"` // 最近入场时间
|
|
|
|
|
+ LastExitTime time.Time `json:"last_exit_time" gorm:"default:null"` // 最近出场时间
|
|
|
|
|
+ TotalStayTime int64 `json:"total_stay_time"` // 总停留时间
|
|
|
|
|
+ TotalFee float64 `json:"total_fee"` // 总费用
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (Vehicle) TableName() string {
|
|
func (Vehicle) TableName() string {
|