Path: blob/master/webhooks/webhook_preview/prisma/schema.prisma
1085 views
// This is your Prisma schema file
// Learn more: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
output = "../generated/prisma_client"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model Webhook {
id String @id @default(uuid())
uuid String @unique
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
requests WebhookRequest[]
@@index([uuid])
}
model WebhookRequest {
id String @id @default(uuid())
webhookId String
webhook Webhook @relation(fields: [webhookId], references: [id], onDelete: Cascade)
data Json
receivedAt DateTime @default(now())
image Image?
}
model Image {
id String @id @default(uuid())
url String
createdAt DateTime @default(now())
webhookRequestId String @unique
webhookRequest WebhookRequest @relation(fields: [webhookRequestId], references: [id], onDelete: Cascade)
}