feat: added estimate fixed expenses
This commit is contained in:
@@ -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);
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user