Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| id | uuid | 2147483647 | gen_random_uuid() |
|
|
||||||
| productId | uuid | 2147483647 | null |
|
|
||||||
| amount | int4 | 10 | null |
|
|
||||||
| frequency | "employer_purchases"."enum_employer_purchases_product_credit_benefits_frequency" | 2147483647 | null |
|
|
||||||
| startDate | timestamptz | 35,6 | now() |
|
|
||||||
| endDate | timestamptz | 35,6 | null |
|
|
||||||
| createdAt | timestamptz | 35,6 | now() |
|
|
||||||
| updatedAt | timestamptz | 35,6 | now() |
|
|
||||||
| timePeriod | int4 | 10 | √ | null |
|
|
|||||
| timePeriodUnit | "employer_purchases"."enum_employer_purchases_timePeriodUnit" | 2147483647 | √ | null |
|
|
|||||
| variant | "employer_purchases"."enum_ProductCreditBenefits_variant" | 2147483647 | 'VARIANT_A'::employer_purchases."enum_ProductCreditBenefits_variant" |
|
|
Variant for each company is determined by Unleash |
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| ProductCreditBenefits_pkey | Primary key | Asc | id |
| ProductCreditBenefits_productId_variant_unique_idx | Must be unique | Asc/Asc | productId + variant |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| timePeriod_and_timePeriodUnit_check | (((("timePeriod" IS NOT NULL) AND ("timePeriod" > 0) AND ("timePeriodUnit" IS NOT NULL)) OR (("timePeriod" IS NULL) AND ("timePeriodUnit" IS NULL)))) |
| ProductCreditBenefits_amount_check | ((amount > 0)) |

