This reverts commit 6868474c92.
Co-authored-by: Bailey Pumfleet <[email protected]>
This commit is contained in:
1 parent
a9ee2ef9ae
commit
30f97117e8
19 files changed
+956
-62
No files matched your search
@@ -0,0 +1,17 @@
|
||||
-- CreateEnum
|
||||
CREATE TYPE "WebhookTriggerEvents" AS ENUM ('BOOKING_CREATED', 'BOOKING_RESCHEDULED', 'BOOKING_CANCELLED');
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "Webhook" (
|
||||
"id" TEXT NOT NULL,
|
||||
"userId" INTEGER NOT NULL,
|
||||
"subscriberUrl" TEXT NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"active" BOOLEAN NOT NULL DEFAULT true,
|
||||
"eventTriggers" "WebhookTriggerEvents"[],
|
||||
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Webhook.id_unique" ON "Webhook"("id");
|
||||
@@ -275,3 +275,18 @@ model Payment {
|
||||
data Json
|
||||
externalId String @unique
|
||||
}
|
||||
|
||||
enum WebhookTriggerEvents {
|
||||
BOOKING_CREATED
|
||||
BOOKING_RESCHEDULED
|
||||
BOOKING_CANCELLED
|
||||
}
|
||||
|
||||
model Webhook {
|
||||
id String @unique @id
|
||||
userId Int
|
||||
subscriberUrl String
|
||||
createdAt DateTime @default(now())
|
||||
active Boolean @default(true)
|
||||
eventTriggers WebhookTriggerEvents[]
|
||||
}
|
||||
Reference in new issue
Block a user