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.

Update commission.prisma

Kiran Kaa65e62d6cc5
diff --git a/packages/prisma/schema/commission.prisma b/packages/prisma/schema/commission.prisma
index 3b54573c40..4202249c39 100644
--- a/packages/prisma/schema/commission.prisma
+++ b/packages/prisma/schema/commission.prisma
@@ -16,26 +16,25 @@ enum CommissionType {
}
model Commission {
- id String @id @default(cuid())
- programId String
- partnerId String
- rewardId String?
- linkId String?
- payoutId String?
- invoiceId String? // only for sales (idempotency key, each sale event is associated with a unique invoice)
- customerId String? // only for leads and sales
- eventId String? @unique // only for leads and sales
- bountySubmissionId String? @unique
- description String?
- type CommissionType
- amount Int // only for sales (amount of the sale event)
- quantity Int // only for clicks/leads (quantity of the event)
- earnings Int @default(0) // amount earned by the partner
- currency String @default("usd")
- status CommissionStatus @default(pending)
- userId String? // user who created the manual commission
- createdAt DateTime @default(now())
- updatedAt DateTime @updatedAt
+ id String @id @default(cuid())
+ programId String
+ partnerId String
+ rewardId String?
+ linkId String?
+ payoutId String?
+ invoiceId String? // only for sales (idempotency key, each sale event is associated with a unique invoice)
+ customerId String? // only for leads and sales
+ eventId String? @unique // only for leads and sales
+ description String?
+ type CommissionType
+ amount Int // only for sales (amount of the sale event)
+ quantity Int // only for clicks/leads (quantity of the event)
+ earnings Int @default(0) // amount earned by the partner
+ currency String @default("usd")
+ status CommissionStatus @default(pending)
+ userId String? // user who created the manual commission
+ createdAt DateTime @default(now())
+ updatedAt DateTime @updatedAt
program Program @relation(fields: [programId], references: [id])
partner Partner @relation(fields: [partnerId], references: [id])