-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.prisma
41 lines (37 loc) · 1.64 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
datasource db {
provider = "mongodb"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
}
model Offer {
id String @id @default(auto()) @map("_id") @db.ObjectId
loanPrincipalAmount BigInt
maximumRepaymentAmount BigInt
nftCollateralId String
loanDuration Int // time in seconds
loanInterestRateForDurationInBasisPoints Int
adminFeeInBasisPoints Int
borrowerNonce BigInt
lenderNonce BigInt?
nftCollateralContract String
loanERC20Denomination String
requesterSignature String
fulfillerSignature String?
requester User @relation("requesterAddress", fields: [requesterAddress], references: [address])
fulfiller User? @relation("fulfillerAddress", fields: [fullfillerAddress], references: [address])
requesterAddress String
fullfillerAddress String?
executionTransaction String?
network String
offerIdInContract String?
userId String? @db.ObjectId
}
model User {
id String @id @default(auto()) @map("_id") @db.ObjectId
address String @unique
name String?
offerRequesterTo Offer[] @relation("requesterAddress")
offerFulfillerTo Offer[] @relation("fulfillerAddress")
}