-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.prisma
78 lines (68 loc) · 3.17 KB
/
schema.prisma
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// This file is automatically generated by Keystone, do not modify it manually.
// Modify your Keystone config when you want to change this.
datasource postgresql {
url = env("DATABASE_URL")
shadowDatabaseUrl = env("SHADOW_DATABASE_URL")
provider = "postgresql"
}
generator client {
provider = "prisma-client-js"
}
model User {
id String @id @default(uuid()) @postgresql.Uuid
name String @default("")
email String @unique @default("")
isAdmin Boolean @default(false)
password String
createdAt DateTime? @default(now())
}
model Place {
id String @id @default(uuid()) @postgresql.Uuid
featured Boolean @default(false)
name String @unique @default("")
address String @default("")
website String @default("")
neighborhood PlaceNeighborhood? @relation("Place_neighborhood", fields: [neighborhoodId], references: [id])
neighborhoodId String? @map("neighborhood") @postgresql.Uuid
image Json?
simpleDescription String @default("")
description Json @default("[{\"type\":\"paragraph\",\"children\":[{\"text\":\"\"}]}]")
mainCategory PlaceCategory? @relation("Place_mainCategory", fields: [mainCategoryId], references: [id])
mainCategoryId String? @map("mainCategory") @postgresql.Uuid
subCategory PlaceCategory? @relation("Place_subCategory", fields: [subCategoryId], references: [id])
subCategoryId String? @map("subCategory") @postgresql.Uuid
time PlaceTime[] @relation("Place_time")
details PlaceDetail[] @relation("Place_details")
googleId String @default("")
from_FavoritesList_places FavoritesList[] @relation("FavoritesList_places")
@@index([neighborhoodId])
@@index([mainCategoryId])
@@index([subCategoryId])
}
model PlaceTime {
id String @id @default(uuid()) @postgresql.Uuid
day String? @default("Sunday")
time String @default("")
from_Place_time Place[] @relation("Place_time")
}
model PlaceNeighborhood {
id String @id @default(uuid()) @postgresql.Uuid
name String @unique @default("")
from_Place_neighborhood Place[] @relation("Place_neighborhood")
}
model PlaceDetail {
id String @id @default(uuid()) @postgresql.Uuid
name String @unique @default("")
from_Place_details Place[] @relation("Place_details")
}
model PlaceCategory {
id String @id @default(uuid()) @postgresql.Uuid
name String @unique @default("")
from_Place_mainCategory Place[] @relation("Place_mainCategory")
from_Place_subCategory Place[] @relation("Place_subCategory")
}
model FavoritesList {
id String @id @default(uuid()) @postgresql.Uuid
url String @unique @default("")
places Place[] @relation("FavoritesList_places")
}