new
This commit is contained in:
@@ -9,3 +9,55 @@ datasource db {
|
||||
provider = "postgresql"
|
||||
url = env("DATABASE_URL")
|
||||
}
|
||||
|
||||
model Restaurant {
|
||||
id Int @id @default(autoincrement())
|
||||
name String
|
||||
main_image String
|
||||
images String[]
|
||||
description String
|
||||
open_time String
|
||||
close_time String
|
||||
slug String @unique
|
||||
price PRICE
|
||||
items Item[]
|
||||
location_id Int
|
||||
location Location @relation(fields: [location_id], references: [id])
|
||||
cuisine_id Int
|
||||
cuisine Cuisine @relation(fields: [cuisine_id], references: [id])
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
}
|
||||
|
||||
model Item {
|
||||
id Int @id @default(autoincrement())
|
||||
name String
|
||||
price String
|
||||
description String
|
||||
restaurant_id Int
|
||||
restaurant Restaurant @relation(fields: [restaurant_id], references: [id])
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
}
|
||||
|
||||
model Location {
|
||||
id Int @id @default(autoincrement())
|
||||
name String
|
||||
restaurants Restaurant[]
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
}
|
||||
|
||||
model Cuisine {
|
||||
id Int @id @default(autoincrement())
|
||||
name String
|
||||
restaurants Restaurant[]
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
}
|
||||
|
||||
enum PRICE {
|
||||
CHEAP
|
||||
REGULAR
|
||||
EXPENSIVE
|
||||
}
|
||||
Reference in New Issue
Block a user