feat: add signing reminder

This commit is contained in:
Ephraim Atta-Duncan
2024-11-21 12:06:03 +00:00
parent 9fc5ec11f4
commit f532c97499
15 changed files with 307 additions and 61 deletions
@@ -0,0 +1,12 @@
/*
Warnings:
- You are about to drop the column `reminderDays` on the `DocumentMeta` table. All the data in the column will be lost.
*/
-- CreateEnum
CREATE TYPE "ReminderInterval" AS ENUM ('NONE', 'EVERY_1_HOUR', 'EVERY_6_HOURS', 'EVERY_12_HOURS', 'DAILY', 'EVERY_3_DAYS', 'WEEKLY', 'EVERY_2_WEEKS', 'MONTHLY');
-- AlterTable
ALTER TABLE "DocumentMeta" DROP COLUMN "reminderDays",
ADD COLUMN "reminderInterval" "ReminderInterval" NOT NULL DEFAULT 'NONE';
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "DocumentMeta" ADD COLUMN "lastReminderSentAt" TIMESTAMP(3);
+14 -1
View File
@@ -363,6 +363,18 @@ enum DocumentDistributionMethod {
NONE
}
enum ReminderInterval {
NONE
EVERY_1_HOUR
EVERY_6_HOURS
EVERY_12_HOURS
DAILY
EVERY_3_DAYS
WEEKLY
EVERY_2_WEEKS
MONTHLY
}
model DocumentMeta {
id String @id @default(cuid())
subject String?
@@ -378,7 +390,8 @@ model DocumentMeta {
language String @default("en")
distributionMethod DocumentDistributionMethod @default(EMAIL)
emailSettings Json?
reminderDays Int? @default(0)
reminderInterval ReminderInterval @default(NONE)
lastReminderSentAt DateTime?
}
enum ReadStatus {