generated from clerk/clerk-nextjs-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.prisma
62 lines (57 loc) · 2.02 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
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
// directUrl = env("DIRECT_URL")
}
model transactions {
id String @id @default(uuid())
name String
notes String?
status String?
type String?
price Decimal @default(0) @db.Decimal(10, 2)
category String?
date DateTime?
tellerTxnId String? @unique @map("teller_txn_id")
Account accounts? @relation(fields: [accountId], references: [id], onDelete: Cascade)
accountId String? @map("account_id")
dateCreated DateTime @default(now()) @map("date_created")
dateUpdated DateTime @default(now()) @updatedAt @map("date_updated")
userId String? @map("user_id")
merchantId String? @map("merchant_id")
Merchant merchants? @relation(fields: [merchantId], references: [id], onDelete: Cascade)
}
model merchants {
id String @id @default(uuid())
name String @unique
Transactions transactions[]
}
model accounts {
id String @id @default(uuid())
name String?
lastFour String? @map("last_four")
institutionId String? @map("institution_id")
institutionName String? @map("institution_name")
status String?
type String?
subtype String?
currency String?
enrollmentId String? @map("enrollment_id")
tellerAccountId String? @unique @map("teller_account_id")
userId String? @map("user_id")
Transactions transactions[]
}
model rules {
id String @id @default(uuid())
dateCreated DateTime @default(now()) @map("date_created")
dateUpdated DateTime @default(now()) @updatedAt @map("date_updated")
name String?
matchType String? @map("match_type")
fieldToCheck String? @map("field_to_check")
keywords String?
fieldToSet String? @map("field_to_set")
valueToSet String? @map("value_to_set")
}