-
Notifications
You must be signed in to change notification settings - Fork 93
Expand file tree
/
Copy pathschema.prisma
More file actions
50 lines (42 loc) · 1.17 KB
/
schema.prisma
File metadata and controls
50 lines (42 loc) · 1.17 KB
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
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
enum WithdrawalStatus {
PENDING
APPROVED
REJECTED
PAID
}
model Project {
id String @id @default(uuid())
creatorId String
fundsRaised Float @default(0)
isCompleted Boolean @default(false)
withdrawals Withdrawal[]
donations Donation[]
}
model Withdrawal {
id String @id @default(uuid())
project_id String
amount Float
status WithdrawalStatus @default(PENDING)
transaction_hash String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
project Project @relation(fields: [project_id], references: [id])
}
model Donation {
id String @id @default(uuid())
projectId String
userId String
amount Float
assetType String @default("USD")
isAnonymous Boolean @default(false)
transactionHash String @unique
createdAt DateTime @default(now())
project Project @relation(fields: [projectId], references: [id])
}