-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathschema.prisma
63 lines (58 loc) · 1.67 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
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
binaryTargets = "native"
}
// Define your own datamodels here and run `yarn redwood prisma migrate dev`
// to create migrations for them and apply to your dev DB.
model User {
id Int @id @default(autoincrement())
email String @unique
hashedPassword String
salt String
resetToken String?
resetTokenExpiresAt DateTime?
confirmed Boolean @default(false)
}
model Partner {
id Int @id @default(autoincrement())
name String
slug String @unique
logo String?
avatar String?
virtualCode String?
virtualDiscount Int?
virtualEndDate DateTime?
inPersonCode String?
inPersonDiscount Int?
inPersonEndDate DateTime?
inPersonUrl String?
Participants Participant[]
createdAt DateTime @default(now())
PartnerType PartnerType @relation(fields: [partnerTypeId], references: [id])
partnerTypeId Int
ogImage String?
}
model Participant {
id Int @id @default(autoincrement())
name String?
email String @unique
company String?
avatar String?
githubId Int?
location String?
twitter String?
partner Partner @relation(fields: [partnerId], references: [id])
partnerId Int
createdAt DateTime @default(now())
ogImage String?
}
model PartnerType {
id Int @id @default(autoincrement())
name String
createdAt DateTime @default(now())
Partners Partner[]
}