Tenant Subscription
- Belongs to a Tenant.
- Determines the current Tenant subscription and its limits.
Life Cycle
| Route | Create | Read | Update | Delete |
|---|---|---|---|---|
| /app/:tenant/settings/subscription | ||||
| /admin/accounts/:id |
Properties
| Name | Title | Type | Description |
|---|---|---|---|
| tenantId * | Tenant | Tenant | Parent Tenant |
| stripeCustomerId | Stripe Customer ID | String | |
| stripeSubscriptionId | Stripe Subscription ID | String | |
| subscriptionPriceId | Subscription Price | SubscriptionPrice | Selected subscription price, e.g. Monthly Price (of the Basic Subscription Product). |
| quantity | Quantity | Int | For products.model=[PER_SEAT] seats quantity input |
Model
model TenantSubscription {
tenantId String @unique
tenant Tenant @relation(fields: [tenantId], references: [id], onDelete: Cascade)
stripeCustomerId String?
stripeSubscriptionId String?
subscriptionPriceId String?
subscriptionPrice SubscriptionPrice? @relation(fields: [subscriptionPriceId], references: [id])
quantity Int
}