Added basic prisma schema

This commit is contained in:
lucast committed 2026-11-20 09:46:10 +01:00
1 parent df5a977608
commit a1c874c153
9 files changed
+140 -9

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
model CarBrand {
id Int @id @default(autoincrement())
name String
carModels CarModel[]
}
model CarModel {
id Int @id @default(autoincrement())
name String
carBrandId Int
brand CarBrand @relation(fields: [carBrandId], references: [id])
cars Car[]
}
model Car {
id Int @id @default(autoincrement())
licensePlate String
productionYear Int
carModelId Int
model CarModel @relation(fields: [carModelId], references: [id])
customerId Int
customer Customer @relation(fields: [customerId], references: [id])
workOrders WorkOrder[]
}