mirror of
https://github.com/EdiFarcas/Car-Fuel-Tracking-App.git
synced 2026-06-22 07:00:55 +03:00
Hybrid cars implementation 1.0(Without stats)
This commit is contained in:
@@ -23,27 +23,27 @@ model Car {
|
||||
make String // Manufacturer (e.g. "BMW")
|
||||
model String // Model (e.g. "320i")
|
||||
year Int // Year (e.g. 2019)
|
||||
fuelType FuelType
|
||||
fuelTypes FuelType[] // Changed from single fuelType to array for hybrid support
|
||||
|
||||
fillUps FillUp[]
|
||||
mileage MileageEntry[]
|
||||
}
|
||||
|
||||
|
||||
model FillUp {
|
||||
id String @id @default(cuid())
|
||||
car Car @relation(fields: [carId], references: [id])
|
||||
car Car @relation(fields: [carId], references: [id], onDelete: Cascade)
|
||||
carId String
|
||||
mileage Int
|
||||
liters Float
|
||||
cost Float
|
||||
currency Currency
|
||||
date DateTime @default(now())
|
||||
fuelType FuelType // Add fuelType to each fill-up
|
||||
}
|
||||
|
||||
model MileageEntry {
|
||||
id String @id @default(cuid())
|
||||
car Car @relation(fields: [carId], references: [id])
|
||||
car Car @relation(fields: [carId], references: [id], onDelete: Cascade)
|
||||
carId String
|
||||
mileage Int
|
||||
date DateTime @default(now())
|
||||
|
||||
Reference in New Issue
Block a user