-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.prisma
44 lines (39 loc) · 1.05 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
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
}
generator typegraphql {
provider = "typegraphql-prisma"
output = "generated/type-graphql"
emitTranspiledCode = true
}
model User {
id String @id @default(uuid())
createdAt DateTime @default(now())
username String @unique
password String
crypto Int @default(0)
campaigns String[] // just put in campaign ids here
}
model Campaign {
id String @id @default(uuid())
name String
contractor String
description String
options String[]
tasks Task[]
totalPrizeAmount Int?
participantLimit Int?
completed Boolean @default(false)
prizeAmountDeposited String @default("null")
}
model Task {
id String @id @default(uuid())
Campaign Campaign @relation(fields: [campaignId], references: [id])
campaignId String
category String?
value String
}