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.

convert ProgramResource to json

Steven Tey7dc2663a12bd
diff --git a/packages/prisma/schema/program.prisma b/packages/prisma/schema/program.prisma
index 1372f1e66f..80e99ba9bb 100644
--- a/packages/prisma/schema/program.prisma
+++ b/packages/prisma/schema/program.prisma
@@ -19,11 +19,6 @@ enum CommissionInterval {
year
}
-enum ProgramResourceType {
- logo
- files
-}
-
model Program {
id String @id @default(cuid())
workspaceId String
@@ -41,6 +36,7 @@ model Program {
defaultRewardId String? @unique // default reward for the program
defaultDiscountId String? @unique // default discount for the program
landerData Json? @db.Json
+ resources Json? @db.Json
termsUrl String? @db.LongText
ageVerification Int?
@@ -52,7 +48,6 @@ model Program {
partners ProgramEnrollment[]
payouts Payout[]
invoices Invoice[]
- resources ProgramResource[]
applications ProgramApplication[]
invites ProgramInvite[]
links Link[]
@@ -111,22 +106,6 @@ model ProgramApplication {
@@index([partnerId])
}
-// 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])
-}
-
model ProgramInvite {
id String @id @default(cuid())
programId String