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.

Add leads and sales to link object

Steven Tey24ce664171e6
diff --git a/apps/web/prisma/schema.prisma b/apps/web/prisma/schema.prisma
index 9c312e5668..898eec9386 100644
--- a/apps/web/prisma/schema.prisma
+++ b/apps/web/prisma/schema.prisma
@@ -252,6 +252,8 @@ model Link {
publicStats Boolean @default(false) // whether to show public stats or not
clicks Int @default(0) // number of clicks
lastClicked DateTime? // when the link was last clicked
+ leads Int @default(0)
+ sales Int @default(0)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
diff --git a/apps/web/tests/utils/schema.ts b/apps/web/tests/utils/schema.ts
index 9f2b4264c9..ce040c12ad 100644
--- a/apps/web/tests/utils/schema.ts
+++ b/apps/web/tests/utils/schema.ts
@@ -25,6 +25,8 @@ export const expectedLink: Partial<Link> & { tagId: string | null } = {
publicStats: false,
clicks: 0,
lastClicked: null,
+ leads: 0,
+ sales: 0,
tagId: null, // backwards compatibility
comments: null,
createdAt: expect.any(String),