(squash) init

feat: filters, settings, backups

fix: ts compile errors

feat: new dashboard, webp previews and settings

feat: use webp for pdfs

feat: use webp

fix: analyze resets old data

fix: switch to corsproxy

fix: switch to free cors

fix: max upload limit

fix: currency conversion

feat: transaction export

fix: currency conversion

feat: refactor settings actions

feat: new loader

feat: README + LICENSE

doc: update readme

doc: update readme

doc: update readme

doc: update screenshots

ci: bump prisma
This commit is contained in:
Vasily Zubarev
2025-03-13 00:30:47 +01:00
commit 0b98a2c307
153 changed files with 17271 additions and 0 deletions

105
prisma/schema.prisma Normal file
View File

@@ -0,0 +1,105 @@
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
model Setting {
code String @unique
name String
description String?
value String?
@@map("settings")
}
model Category {
code String @id
name String
color String @default("#000000")
llm_prompt String?
transactions Transaction[]
createdAt DateTime @default(now()) @map("created_at")
@@map("categories")
}
model Project {
code String @id
name String
color String @default("#000000")
llm_prompt String?
transactions Transaction[]
createdAt DateTime @default(now()) @map("created_at")
@@map("projects")
}
model Field {
id String @id @default(uuid())
code String @unique
name String
type String
llm_prompt String?
options Json?
isRequired Boolean @default(false) @map("is_required")
isExtra Boolean @default(true) @map("is_extra")
@@map("fields")
}
model File {
id String @id @default(uuid())
filename String
path String
mimetype String
metadata Json?
isReviewed Boolean @default(false) @map("is_reviewed")
createdAt DateTime @default(now()) @map("created_at")
@@map("files")
}
model Transaction {
id String @id @default(uuid())
name String?
description String?
merchant String?
total Int?
currencyCode String? @map("currency_code")
convertedTotal Int? @map("converted_total")
convertedCurrencyCode String? @map("converted_currency_code")
type String? @default("expense")
note String?
files Json @default("[]")
extra Json?
category Category? @relation(fields: [categoryCode], references: [code])
categoryCode String? @map("category_id")
project Project? @relation(fields: [projectCode], references: [code])
projectCode String? @map("project_id")
issuedAt DateTime? @map("issued_at")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
text String?
@@index([projectCode])
@@index([categoryCode])
@@index([issuedAt])
@@index([name])
@@index([merchant])
@@index([total])
@@map("transactions")
}
model Currency {
code String @id
name String
@@map("currencies")
}