Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

format prisma

Steven Tey4469882133b7
diff --git a/packages/prisma/schema/campaign.prisma b/packages/prisma/schema/campaign.prisma
index a3bc4d9be3..24a32698e2 100644
--- a/packages/prisma/schema/campaign.prisma
+++ b/packages/prisma/schema/campaign.prisma
@@ -11,18 +11,18 @@ enum CampaignStatus {
}
model Campaign {
- id String @id @default(cuid())
- programId String
- workflowId String? @unique
- userId String
- type CampaignType
- status CampaignStatus @default(draft)
- name String
- subject String
- body String @db.Text
- scheduledAt DateTime?
- createdAt DateTime @default(now())
- updatedAt DateTime @updatedAt
+ id String @id @default(cuid())
+ programId String
+ workflowId String? @unique
+ userId String
+ type CampaignType
+ status CampaignStatus @default(draft)
+ name String
+ subject String
+ body String @db.Text
+ scheduledAt DateTime?
+ createdAt DateTime @default(now())
+ updatedAt DateTime @updatedAt
program Program @relation(fields: [programId], references: [id])
workflow Workflow? @relation(fields: [workflowId], references: [id], onDelete: Cascade)
diff --git a/packages/prisma/schema/link.prisma b/packages/prisma/schema/link.prisma
index f686b50e68..ecfed0ca3d 100644
--- a/packages/prisma/schema/link.prisma
+++ b/packages/prisma/schema/link.prisma
@@ -61,11 +61,11 @@ model Link {
sales Int @default(0) // number of sales (includes recurring sales)
saleAmount Int @default(0) // total revenue from sales (in cents)
- lastClicked DateTime? // when the link was last clicked
- lastLeadAt DateTime? // when the link last brought in a new lead
+ lastClicked DateTime? // when the link was last clicked
+ lastLeadAt DateTime? // when the link last brought in a new lead
lastConversionAt DateTime? // when the link last brought in a new conversion
- createdAt DateTime @default(now())
- updatedAt DateTime @updatedAt
+ createdAt DateTime @default(now())
+ updatedAt DateTime @updatedAt
// Link short domain
shortDomain Domain @relation(fields: [domain], references: [slug])
diff --git a/packages/prisma/schema/workspace.prisma b/packages/prisma/schema/workspace.prisma
index 862b1a6945..a6188646de 100644
--- a/packages/prisma/schema/workspace.prisma
+++ b/packages/prisma/schema/workspace.prisma
@@ -41,11 +41,11 @@ model Project {
allowedHostnames Json?
publishableKey String? @unique // for the client-side publishable key
- conversionEnabled Boolean @default(false) // Whether to enable conversion tracking for links by default
- webhookEnabled Boolean @default(false)
- ssoEnabled Boolean @default(false) // TODO: this is not used
- dotLinkClaimed Boolean @default(false)
- ssoEmailDomain String? @unique
+ conversionEnabled Boolean @default(false) // Whether to enable conversion tracking for links by default
+ webhookEnabled Boolean @default(false)
+ ssoEnabled Boolean @default(false) // TODO: this is not used
+ dotLinkClaimed Boolean @default(false)
+ ssoEmailDomain String? @unique
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt