mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
chore: add team to webhook model
This commit is contained in:
@ -0,0 +1,5 @@
|
|||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Webhook" ADD COLUMN "teamId" INTEGER;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE "Webhook" ADD CONSTRAINT "Webhook_teamId_fkey" FOREIGN KEY ("teamId") REFERENCES "Team"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||||
@ -115,6 +115,8 @@ model Webhook {
|
|||||||
updatedAt DateTime @default(now()) @updatedAt
|
updatedAt DateTime @default(now()) @updatedAt
|
||||||
userId Int
|
userId Int
|
||||||
User User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
User User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||||
|
teamId Int?
|
||||||
|
team Team? @relation(fields: [teamId], references: [id], onDelete: Cascade)
|
||||||
WebhookCall WebhookCall[]
|
WebhookCall WebhookCall[]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -417,6 +419,7 @@ model Team {
|
|||||||
document Document[]
|
document Document[]
|
||||||
templates Template[]
|
templates Template[]
|
||||||
ApiToken ApiToken[]
|
ApiToken ApiToken[]
|
||||||
|
Webhook Webhook[]
|
||||||
}
|
}
|
||||||
|
|
||||||
model TeamPending {
|
model TeamPending {
|
||||||
|
|||||||
Reference in New Issue
Block a user