-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathschema.prisma
34 lines (30 loc) · 874 Bytes
/
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
generator client {
provider = "prisma-client-js"
previewFeatures = ["reactNative"]
}
datasource db {
provider = "sqlite"
url = "file:./app.db"
}
model Categories {
id Int @id @default(autoincrement())
name String
type String
transactions Transactions[]
}
model Transactions {
id Int @id @default(autoincrement())
category_id Int
amount Float
date Int
description String @default("")
type String
category Categories? @relation(fields: [category_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
}
model AddTransactionView {
isAddingTransaction Boolean @default(false)
amount Float @default(0)
description String @default("")
type String @unique @default("Expense")
categoryId Int?
}