Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| paidCredits | int4 | 10 | null |
|
|
|||||||||
| freeCredits | int4 | 10 | √ | null |
|
|
||||||||
| timePeriod | int4 | 10 | √ | null |
|
|
||||||||
| timePeriodUnit | "employer_purchases"."enum_employer_purchases_timePeriodUnit" | 2147483647 | √ | null |
|
|
||||||||
| createdAt | timestamptz | 35,6 | now() |
|
|
|||||||||
| updatedAt | timestamptz | 35,6 | now() |
|
|
|||||||||
| id | uuid | 2147483647 | gen_random_uuid() |
|
|
|||||||||
| sku | text | 2147483647 | √ | null |
|
|
Sku name. Used as the In-app product id configured in App Store/Play Store |
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| CreditPackages_pkey | Primary key | Asc | id |
| CreditPackages_paidCredits_idx | Must be unique | Asc | paidCredits |
| CreditPackages_sku_key | Must be unique | Asc | sku |
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)))) |
| CreditPackages_paidCredits_check | (("paidCredits" > 0)) |
| CreditPackages_freeCredits_check | ((("freeCredits" IS NULL) OR ("freeCredits" > 0))) |

