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.

use EventType

Steven Tey4c83dc6030e0
diff --git a/packages/prisma/schema/commission.prisma b/packages/prisma/schema/commission.prisma
index 92a275b7ba..c047d76574 100644
--- a/packages/prisma/schema/commission.prisma
+++ b/packages/prisma/schema/commission.prisma
@@ -8,7 +8,7 @@ enum CommissionStatus {
canceled
}
-enum CommissionType {
+enum EventType {
click
lead
sale
@@ -25,7 +25,7 @@ model Commission {
customerId String? // only for leads and sales
eventId String? @unique // only for leads and sales
- type CommissionType
+ type EventType
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
diff --git a/packages/prisma/schema/reward.prisma b/packages/prisma/schema/reward.prisma
index b1ff8471b3..3a530799ec 100644
--- a/packages/prisma/schema/reward.prisma
+++ b/packages/prisma/schema/reward.prisma
@@ -1,10 +1,3 @@
-
-enum EventType {
- click
- lead
- sale
-}
-
model Reward {
id String @id @default(cuid())
programId String