Add owner reminders for recurring treasury patterns with once-or-daily cadence.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "FinancialRecurringItem" ADD COLUMN "reminderDaysBefore" INTEGER;
|
||||
ALTER TABLE "FinancialRecurringItem" ADD COLUMN "reminderNotifyApp" BOOLEAN NOT NULL DEFAULT true;
|
||||
ALTER TABLE "FinancialRecurringItem" ADD COLUMN "reminderNotifySms" BOOLEAN NOT NULL DEFAULT true;
|
||||
ALTER TABLE "FinancialRecurringItem" ADD COLUMN "reminderLastSentDay" TEXT;
|
||||
ALTER TABLE "FinancialRecurringItem" ADD COLUMN "reminderLastSentDue" TIMESTAMP(3);
|
||||
@@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "FinancialRecurringItem" ADD COLUMN "reminderRepeatDaily" BOOLEAN NOT NULL DEFAULT true;
|
||||
@@ -2520,6 +2520,15 @@ model FinancialRecurringItem {
|
||||
categoryId String?
|
||||
isActive Boolean @default(true)
|
||||
createdById String?
|
||||
/// null = بدون یادآور؛ ۰ = روز سررسید؛ N = N روز قبل از سررسید
|
||||
reminderDaysBefore Int?
|
||||
/// true = هر روز از N تا سررسید؛ false = فقط همان روز مشخصشده یکبار
|
||||
reminderRepeatDaily Boolean @default(true)
|
||||
reminderNotifyApp Boolean @default(true)
|
||||
reminderNotifySms Boolean @default(true)
|
||||
/// آخرین روزی که برای nextDue فعلی یادآور ارسال شد (YYYY-MM-DD تهران)
|
||||
reminderLastSentDay String?
|
||||
reminderLastSentDue DateTime?
|
||||
occurrences FinancialRecurringOccurrence[]
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
Reference in New Issue
Block a user