update subscription module
This commit is contained in:
@@ -1179,3 +1179,37 @@ model PricingConfig {
|
||||
@@unique([plan, billingPeriod])
|
||||
@@map("pricing_configs")
|
||||
}
|
||||
|
||||
model PlanFeature {
|
||||
id String @id @default(cuid())
|
||||
plan Plan
|
||||
label String
|
||||
sortOrder Int @default(0)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@index([plan, sortOrder])
|
||||
@@map("plan_features")
|
||||
}
|
||||
|
||||
model PricingPromotion {
|
||||
id String @id @default(cuid())
|
||||
code String @unique
|
||||
name String
|
||||
description String?
|
||||
discountType String // 'PERCENTAGE' | 'FIXED'
|
||||
discountValue Int // percentage (1-100) or centimes for FIXED
|
||||
plans String[] // empty array = all plans
|
||||
periods String[] // empty array = all periods
|
||||
maxUses Int?
|
||||
usedCount Int @default(0)
|
||||
validFrom DateTime
|
||||
validUntil DateTime?
|
||||
isActive Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
createdBy String?
|
||||
|
||||
@@index([isActive])
|
||||
@@map("pricing_promotions")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user