-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.prisma
37 lines (33 loc) · 879 Bytes
/
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
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
binaryTargets = "native"
}
model Doctor {
id Int @id @default(autoincrement())
name String
specialty String
Patient Patient[]
Appointment Appointment[]
}
model Patient {
id Int @id @default(autoincrement())
name String
dob DateTime
address String
doctor Doctor? @relation(fields: [doctorId], references: [id])
doctorId Int?
Appointment Appointment[]
}
model Appointment {
id Int @id @default(autoincrement())
date DateTime
location String
doctor Doctor @relation(fields: [doctorId], references: [id])
doctorId Int
patient Patient @relation(fields: [patientId], references: [id])
patientId Int
}