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 ProgramResource

Kiran K43f9babec314
diff --git a/apps/web/prisma/schema/program.prisma b/apps/web/prisma/schema/program.prisma
index 9d5e0edda3..88aebb7b87 100644
--- a/apps/web/prisma/schema/program.prisma
+++ b/apps/web/prisma/schema/program.prisma
@@ -19,6 +19,11 @@ enum CommissionInterval {
year
}
+enum ProgramResourceType {
+ logo
+ files
+}
+
model Program {
id String @id @default(cuid())
workspaceId String
@@ -41,6 +46,7 @@ model Program {
partners ProgramEnrollment[]
payouts Payout[]
sales Sale[]
+ resources ProgramResource[]
@@index([workspaceId])
}
@@ -62,3 +68,19 @@ model ProgramEnrollment {
@@index([programId])
@@index([linkId])
}
+
+// TODO: Haven't finalized the resource table yet.
+model ProgramResource {
+ id String @id @default(cuid())
+ programId String
+ type ProgramResourceType
+ name String
+ url String
+ size Int?
+ createdAt DateTime @default(now())
+ updatedAt DateTime @updatedAt
+
+ program Program @relation(fields: [programId], references: [id])
+
+ @@index([programId])
+}