Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| id | uuid | 2147483647 | gen_random_uuid() |
|
|
||||||
| ruleCode | varchar | 64 | null |
|
|
||||||
| category | "employer_purchases"."enum_employer_purchases_CompanyPromotionRules_category" | 2147483647 | √ | null |
|
|
TRANSACTION_DRIVEN, INTERACTION_DRIVEN and SOCIAL_DRIVEN categories are usually fired in response to real-time user behaviour. LIFECYCLE_DRIVEN categories are usually fired by scheduled jobs or big-data pipelines. |
||||
| triggerType | "employer_purchases"."enum_employer_purchases_CompanyPromotionRules_triggerType" | 2147483647 | null |
|
|
EVENT: triggered synchronously by a user action in real time. SCHEDULED: triggered asynchronously by a scheduled job or a batch/big-data pipeline. |
|||||
| trigger | "employer_purchases"."enum_employer_purchases_CompanyPromotionRules_trigger" | 2147483647 | null |
|
|
||||||
| startTime | timestamptz | 35,6 | null |
|
|
||||||
| endTime | timestamptz | 35,6 | null |
|
|
||||||
| status | "employer_purchases"."enum_employer_purchases_CompanyPromotionRules_status" | 2147483647 | null |
|
|
||||||
| priority | int4 | 10 | √ | null |
|
|
|||||
| conditions | jsonb | 2147483647 | null |
|
|
||||||
| actionType | "employer_purchases"."enum_employer_purchases_CompanyPromotionRules_actionType" | 2147483647 | null |
|
|
||||||
| action | jsonb | 2147483647 | null |
|
|
||||||
| metadata | jsonb | 2147483647 | √ | null |
|
|
|||||
| countryCode | varchar | 8 | null |
|
|
||||||
| isDefault | bool | 1 | null |
|
|
||||||
| createdBy | uuid | 2147483647 | null |
|
|
||||||
| updatedBy | uuid | 2147483647 | null |
|
|
||||||
| createdAt | timestamptz | 35,6 | now() |
|
|
||||||
| updatedAt | timestamptz | 35,6 | now() |
|
|
||||||
| version | bigserial | 19 | √ | nextval('employer_purchases."CompanyPromotionRules_version_seq"'::regclass) |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| CompanyPromotionRules_pkey | Primary key | Asc | id |
| CompanyPromotionRules_category_idx | Performance | Asc | category |
| CompanyPromotionRules_countryCode_idx | Performance | Asc | countryCode |
| CompanyPromotionRules_isDefault_idx | Performance | Asc | isDefault |
| CompanyPromotionRules_ruleCode_idx | Performance | Asc | ruleCode |
| CompanyPromotionRules_ruleCode_isDefault_key | Must be unique | Asc/Asc | ruleCode + isDefault |
| CompanyPromotionRules_ruleCode_version_key | Must be unique | Asc/Asc | ruleCode + version |
| CompanyPromotionRules_status_idx | Performance | Asc | status |
| CompanyPromotionRules_trigger_idx | Performance | Asc | trigger |

