mirror of
https://github.com/GithubOrgProjectPiza/server.git
synced 2026-09-04 08:36:10 +02:00
Fix prisma schema
This commit is contained in:
@@ -30,15 +30,22 @@ model Pizza {
|
|||||||
description String?
|
description String?
|
||||||
restaurant Restaurant @relation(fields: [restaurantId], references: [id])
|
restaurant Restaurant @relation(fields: [restaurantId], references: [id])
|
||||||
restaurantId Int
|
restaurantId Int
|
||||||
|
orders PizzatoOrder[]
|
||||||
}
|
}
|
||||||
|
|
||||||
model Order {
|
model Order {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
user User @relation(fields: [userId], references: [id])
|
user User @relation(fields: [userId], references: [id])
|
||||||
userId Int
|
userId Int
|
||||||
|
pizzas PizzatoOrder[]
|
||||||
|
}
|
||||||
|
|
||||||
|
model PizzatoOrder {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
order Order @relation(fields: [orderId], references: [id])
|
||||||
|
orderId Int
|
||||||
pizza Pizza @relation(fields: [pizzaId], references: [id])
|
pizza Pizza @relation(fields: [pizzaId], references: [id])
|
||||||
pizzaId Int
|
pizzaId Int
|
||||||
amount Int
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Role {
|
enum Role {
|
||||||
|
|||||||
Reference in New Issue
Block a user