auto unsubscribe on bounce and compaints (#117)
* auto unsubscribe on bounce and compaints * console
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
-- CreateEnum
|
||||
CREATE TYPE "UnsubscribeReason" AS ENUM ('BOUNCED', 'COMPLAINED', 'UNSUBSCRIBED');
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "Contact" ADD COLUMN "unsubscribeReason" "UnsubscribeReason";
|
@@ -1,3 +1,3 @@
|
||||
# Please do not edit this file manually
|
||||
# It should be added in your version-control system (i.e. Git)
|
||||
# It should be added in your version-control system (e.g., Git)
|
||||
provider = "postgresql"
|
@@ -235,16 +235,23 @@ model ContactBook {
|
||||
@@index([teamId])
|
||||
}
|
||||
|
||||
enum UnsubscribeReason {
|
||||
BOUNCED
|
||||
COMPLAINED
|
||||
UNSUBSCRIBED
|
||||
}
|
||||
|
||||
model Contact {
|
||||
id String @id @default(cuid())
|
||||
firstName String?
|
||||
lastName String?
|
||||
email String
|
||||
subscribed Boolean @default(true)
|
||||
properties Json
|
||||
contactBookId String
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
id String @id @default(cuid())
|
||||
firstName String?
|
||||
lastName String?
|
||||
email String
|
||||
subscribed Boolean @default(true)
|
||||
unsubscribeReason UnsubscribeReason?
|
||||
properties Json
|
||||
contactBookId String
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
contactBook ContactBook @relation(fields: [contactBookId], references: [id], onDelete: Cascade)
|
||||
|
||||
|
Reference in New Issue
Block a user