Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | uuid | 2147483647 | gen_random_uuid() |
|
|
|||||||||||||||
| companyId | uuid | 2147483647 | √ | null |
|
|
||||||||||||||
| productId | uuid | 2147483647 | null |
|
|
|||||||||||||||
| subscriptionStatus | "employer_purchases"."enum_CompanyProductSubscriptions_subscriptionStatus" | 2147483647 | null |
|
|
|||||||||||||||
| nextPaymentStatus | "employer_purchases"."enum_CompanyProductSubscriptions_nextPaymentStatus" | 2147483647 | √ | null |
|
|
||||||||||||||
| nextPaymentChargeDate | timestamptz | 35,6 | √ | null |
|
|
||||||||||||||
| createdAt | timestamptz | 35,6 | now() |
|
|
|||||||||||||||
| updatedAt | timestamptz | 35,6 | now() |
|
|
|||||||||||||||
| paymentService | "employer_purchases"."enum_CreditPurchaseOrderPaymentRequests_paymentService" | 2147483647 | null |
|
|
|||||||||||||||
| bufferTimePeriod | int4 | 10 | √ | null |
|
|
Time period of the buffer added for the subscription |
|||||||||||||
| bufferTimePeriodUnit | "employer_purchases"."enum_employer_purchases_timePeriodUnit" | 2147483647 | √ | null |
|
|
Time period unit of the buffer added for the subscription |
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| CompanyProductSubscriptions_pkey | Primary key | Asc | id |
| CompanyProductSubscriptions_unique_idx | Must be unique | Asc/Asc/Asc | companyId + productId + subscriptionStatus |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| bufferTimePeriod_bufferTimePeriodUnit_check | (((("bufferTimePeriod" IS NOT NULL) AND ("bufferTimePeriod" > 0) AND ("bufferTimePeriodUnit" IS NOT NULL)) OR (("bufferTimePeriod" IS NULL) AND ("bufferTimePeriodUnit" IS NULL)))) |

