Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments |
|---|---|---|---|---|---|---|---|---|
| id | uuid | 2147483647 | gen_random_uuid() |
|
|
|||
| planType | "employer_commerce"."enum_SubscriptionPlan_types" | 2147483647 | null |
|
|
The type of subscription plan: FREE, STANDARD, GROWTH, SCALE, UNLIMITED, or CUSTOMIZED |
||
| concurrentJobSlots | int4 | 10 | √ | null |
|
|
The number of job slots that a company can utilize under the subscription mode. When the planType is set to UNLIMITED, a relatively large number (e.g., currently set to 1000) will be assigned. However, when the planType is set to CUSTOMIZED, the value will be set as null. |
|
| defaultPrice | numeric | 0 | √ | null |
|
|
The default price of the subscription plan. This is negotiable and if a plan is added for a company, price sold to company can be different than default price. |
|
| currencyCode | "employer_commerce"."enum_EmployerCommerce_Currency" | 2147483647 | √ | null |
|
|
The prices currency, and its ISO 4217 Currency code e.g. IDR etc. |
|
| periodInDays | int4 | 10 | √ | null |
|
|
The duration of the plan in days |
|
| promotionPercentage | int4 | 10 | null |
|
|
The percentage of promotion. Must be greater than or equal to 0. |
||
| createdAt | timestamptz | 35,6 | now() |
|
|
|||
| updatedAt | timestamptz | 35,6 | now() |
|
|
|||
| timePeriod | int4 | 10 | √ | null |
|
|
||
| timePeriodUnit | "employer_commerce"."enum_SubscriptionPlan_timePeriodUnit" | 2147483647 | √ | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| SubscriptionPlans_pkey | Primary key | Asc | id |
| SubscriptionPlans_planType_key | Must be unique | Asc | planType |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| timePeriodUnit | (((("timePeriod" IS NOT NULL) AND ("timePeriodUnit" IS NOT NULL)) OR (("timePeriod" IS NULL) AND ("timePeriodUnit" IS NULL)))) |
| SubscriptionPlans_promotionPercentage_check | (("promotionPercentage" >= 0)) |
| timePeriod | (((("timePeriod" IS NOT NULL) AND ("timePeriod" > 0)) OR ("timePeriod" IS NULL))) |
| concurrentJobSlotsCheck | (((("planType" <> 'CUSTOMIZED'::employer_commerce."enum_SubscriptionPlan_types") AND ("concurrentJobSlots" IS NOT NULL)) OR (("planType" = 'CUSTOMIZED'::employer_commerce."enum_SubscriptionPlan_types") AND ("concurrentJobSlots" IS NULL)))) |
| defaultPrice_and_currency_code_check | (((("defaultPrice" IS NULL) AND ("currencyCode" IS NULL)) OR (("defaultPrice" IS NOT NULL) AND ("defaultPrice" > (0)::numeric) AND ("currencyCode" IS NOT NULL)))) |
