This repository has been archived on 2026-02-01. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
diarywhisper/prisma/schema.prisma
Riccardo Senica e4c9b0d2ec
Some checks failed
Deploy / lint-build-deploy (push) Failing after 58s
feat: switch to sweego
2026-02-01 14:06:33 +01:00

39 lines
927 B
Plaintext

generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "linux-musl-openssl-3.0.x"]
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model Expense {
id String @id @default(cuid())
description String
cost Float
deleted Boolean @default(false)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
categoryId String
category Category @relation(fields: [categoryId], references: [id])
@@index([categoryId])
}
model Category {
id String @id @default(cuid())
name String @unique
createdAt DateTime @default(now())
expenses Expense[]
}
model DayLog {
id String @id @default(cuid())
date DateTime @unique // When querying, ensure date is set to midnight UTC
comments Json
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([date])
}