Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | uuid | 2147483647 | gen_random_uuid() |
|
|
|||||||||
| companyId | uuid | 2147483647 | null |
|
|
|||||||||
| creditProductSubscriptionPackageId | uuid | 2147483647 | null |
|
|
|||||||||
| status | "employer_purchases"."enum_CompanyProductSubscriptionFreeTrialOffers_status" | 2147483647 | null |
|
|
|||||||||
| productQuantity | int4 | 10 | null |
|
|
|||||||||
| timePeriod | int4 | 10 | √ | null |
|
|
Time period of the product |
|||||||
| timePeriodUnit | "employer_purchases"."enum_employer_purchases_timePeriodUnit" | 2147483647 | √ | null |
|
|
Time period unit of the product |
|||||||
| timePeriodValidityType | "employer_purchases"."enum_employer_purchases_timePeriodValidityType" | 2147483647 | 'MAX_WITH_CURRENT_EXPIRY'::employer_purchases."enum_employer_purchases_timePeriodValidityType" |
|
|
Time period validity type of the product |
||||||||
| trialTimePeriod | int4 | 10 | null |
|
|
|||||||||
| trialTimePeriodUnit | "employer_purchases"."enum_employer_purchases_timePeriodUnit" | 2147483647 | null |
|
|
|||||||||
| createdAt | timestamptz | 35,6 | now() |
|
|
|||||||||
| updatedAt | timestamptz | 35,6 | now() |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| CompanyProductSubscriptionFreeTrialOffers_pkey | Primary key | Asc | id |
| CompanyProductSubscriptionFreeTrialOffers_unique_idx | Must be unique | Asc/Asc/Asc | companyId + creditProductSubscriptionPackageId + status |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| CompanyProductSubscriptionFreeTrialOffers_trialTimePeriod_check | (("trialTimePeriod" > 0)) |
| timePeriod_and_timePeriodUnit_check | (((("timePeriod" IS NOT NULL) AND ("timePeriod" > 0) AND ("timePeriodUnit" IS NOT NULL)) OR (("timePeriod" IS NULL) AND ("timePeriodUnit" IS NULL)))) |
| CompanyProductSubscriptionFreeTrialOffers_productQuantity_check | (("productQuantity" > 0)) |

