feat: added estimate fixed expenses
All checks were successful
Deploy / deploy (push) Successful in 1m26s
Security Tests / security-non-db (push) Successful in 20s
Security Tests / security-db (push) Successful in 22s

This commit is contained in:
2026-03-02 10:49:12 -06:00
parent e0313df24b
commit 301b3f8967
7 changed files with 583 additions and 6 deletions

View File

@@ -0,0 +1,6 @@
ALTER TABLE "FixedPlan"
ADD COLUMN IF NOT EXISTS "amountMode" TEXT NOT NULL DEFAULT 'fixed',
ADD COLUMN IF NOT EXISTS "estimatedCents" BIGINT,
ADD COLUMN IF NOT EXISTS "actualCents" BIGINT,
ADD COLUMN IF NOT EXISTS "actualCycleDueOn" TIMESTAMP(3),
ADD COLUMN IF NOT EXISTS "actualRecordedAt" TIMESTAMP(3);

View File

@@ -70,6 +70,11 @@ model FixedPlan {
userId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
name String
amountMode String @default("fixed") // "fixed" | "estimated"
estimatedCents BigInt?
actualCents BigInt?
actualCycleDueOn DateTime?
actualRecordedAt DateTime?
cycleStart DateTime
dueOn DateTime
totalCents BigInt