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 customer_id implementation

Steven Tey129389db062d
diff --git a/apps/web/prisma/schema.prisma b/apps/web/prisma/schema.prisma
index e4291b13c0..e94769bbeb 100644
--- a/apps/web/prisma/schema.prisma
+++ b/apps/web/prisma/schema.prisma
@@ -111,6 +111,7 @@ model Project {
links Link[]
domains Domain[]
tags Tag[]
+ customers Customer[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@ -301,6 +302,22 @@ model LinkTag {
@@index(tagId)
}
+model Customer {
+ id String @id @default(cuid())
+ name String?
+ email String?
+ avatar String?
+ externalId String?
+ projectId String
+ project Project @relation(fields: [projectId], references: [id], onDelete: Cascade)
+
+ createdAt DateTime @default(now())
+ updatedAt DateTime @updatedAt
+
+ @@index([projectId])
+ @@unique([projectId, externalId])
+}
+
model jackson_index {
id Int @id @default(autoincrement())
key String @db.VarChar(250)