The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Merge branch 'main' into link-based-coupon-codes
Kiran Kda8fb3fe64f2
diff --cc packages/prisma/schema/partner.prismaindex 3202fd0085,7129a38f58..c326d88a94--- a/packages/prisma/schema/partner.prisma+++ b/packages/prisma/schema/partner.prisma@@@ -14,6 -14,14 +14,59 @@@ enum PartnerProfileTypecompany}+ enum MonthlyTraffic {+ ZeroToOneThousand+ OneThousandToTenThousand+ TenThousandToFiftyThousand+ FiftyThousandToOneHundredThousand+ OneHundredThousandPlus+ }+++enum IndustryInterest {++ SaaS++ DevTool++ AI++ Creative_And_Design++ Productivity_Software++ Marketing++ Gaming++ Finance++ Sales++ Ecommerce++ Customer_Service_And_Support++ Content_Management++ Human_Resources++ Security++ Analytics_And_Data++ Social_Media++ Consumer_Tech++ Education_And_Learning++ Health_And_Fitness++ Food_And_Beverage++ Travel_And_Lifestyle++ Entertainment_And_Media++ Sports++ Science_And_Engineering++}++++enum PreferredEarningStructure {++ Revenue_Share++ Per_Lead++ Per_Sale++ Per_Click++ One_Time_Payment++}++++enum SalesChannel {++ Blogs++ Coupons++ Direct_Reselling++ Newsletters++ Social_Media++ Events++ Company_Referrals++}++model Partner {id String @id @default(cuid())name String@@@ -49,17 -57,21 +102,21 @@@tiktok String?tiktokVerifiedAt DateTime?invoiceSettings Json?+ monthlyTraffic MonthlyTraffic?-- programs ProgramEnrollment[]-- users PartnerUser[]-- invites PartnerInvite[]-- payouts Payout[]-- commissions Commission[]-- bountySubmissions BountySubmission[]-- messages Message[]- sentMessages Message[] @relation("SenderPartner")- sentMessages Message[] @relation("SenderPartner")-- comments PartnerComment[]- discountCodes DiscountCode[]-++ programs ProgramEnrollment[]++ users PartnerUser[]++ invites PartnerInvite[]++ payouts Payout[]++ commissions Commission[]++ bountySubmissions BountySubmission[]++ messages Message[]++ sentMessages Message[] @relation("SenderPartner")++ comments PartnerComment[]+ industryInterests PartnerIndustryInterest[]+ preferredEarningStructures PartnerPreferredEarningStructure[]+ salesChannels PartnerSalesChannel[]++ discountCodes DiscountCode[]}model PartnerInvite {@@@ -102,3 -114,78 +159,30 @@@ model PartnerNotificationPreferencespartnerUser PartnerUser @relation(fields: [partnerUserId], references: [id], onDelete: Cascade)}+-enum IndustryInterest {- SaaS- DevTool- AI- Creative_And_Design- Productivity_Software- Marketing- Gaming- Finance- Sales- Ecommerce- Customer_Service_And_Support- Content_Management- Human_Resources- Security- Analytics_And_Data- Social_Media- Consumer_Tech- Education_And_Learning- Health_And_Fitness- Food_And_Beverage- Travel_And_Lifestyle- Entertainment_And_Media- Sports- Science_And_Engineering-}-+ model PartnerIndustryInterest {- partnerId String++ partnerId String+ industryInterest IndustryInterest++ partner Partner @relation(fields: [partnerId], references: [id], onDelete: Cascade)++ @@unique([partnerId, industryInterest])- @@index(partnerId)-}--enum PreferredEarningStructure {- Revenue_Share- Per_Lead- Per_Sale- Per_Click- One_Time_Payment+ }++ model PartnerPreferredEarningStructure {- partnerId String++ partnerId String+ preferredEarningStructure PreferredEarningStructure++ partner Partner @relation(fields: [partnerId], references: [id], onDelete: Cascade)++ @@unique([partnerId, preferredEarningStructure])- @@index(partnerId)-}--enum SalesChannel {- Blogs- Coupons- Direct_Reselling- Newsletters- Social_Media- Events- Company_Referrals+ }++ model PartnerSalesChannel {- partnerId String++ partnerId String+ salesChannel SalesChannel++ partner Partner @relation(fields: [partnerId], references: [id], onDelete: Cascade)++ @@unique([partnerId, salesChannel])- @@index(partnerId)-}++}