Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| id | bigserial | 19 | √ | nextval('employer_purchases."CompanyPromotionExecutions_id_seq"'::regclass) |
|
|
|||||
| ruleId | uuid | 2147483647 | null |
|
|
||||||
| ruleCode | varchar | 64 | null |
|
|
||||||
| companyId | uuid | 2147483647 | null |
|
|
||||||
| trigger | varchar | 64 | null |
|
|
||||||
| executionMode | "employer_purchases"."enum_employer_purchases_CompanyPromotionExecutions_executionMod" | 2147483647 | null |
|
|
REALTIME: executed by EventWorkers in response to a real-time user action. SCHEDULED: executed by ScheduledWorkers as part of a scheduled job or batch/big-data pipeline. |
|||||
| eventKey | varchar | 256 | null |
|
|
Stable de-duplication key, built as ${companyId}: |
|||||
| eventId | int8 | 19 | √ | null |
|
|
|||||
| eventTime | timestamptz | 35,6 | √ | null |
|
|
|||||
| actionType | "employer_purchases"."enum_employer_purchases_CompanyPromotionExecutions_actionType" | 2147483647 | null |
|
|
||||||
| actionSnapshot | jsonb | 2147483647 | null |
|
|
||||||
| status | "employer_purchases"."enum_employer_purchases_CompanyPromotionExecutions_status" | 2147483647 | null |
|
|
||||||
| retryCount | int4 | 10 | 0 |
|
|
||||||
| errorCode | varchar | 64 | √ | null |
|
|
|||||
| errorMessage | varchar | 255 | √ | null |
|
|
|||||
| executeAt | timestamptz | 35,6 | null |
|
|
||||||
| createdAt | timestamptz | 35,6 | now() |
|
|
||||||
| updatedAt | timestamptz | 35,6 | now() |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| CompanyPromotionExecutions_pkey | Primary key | Asc | id |
| CompanyPromotionExecutions_actionType_idx | Performance | Asc | actionType |
| CompanyPromotionExecutions_companyId_idx | Performance | Asc | companyId |
| CompanyPromotionExecutions_companyId_ruleCode_eventKey_key | Must be unique | Asc/Asc/Asc | companyId + ruleCode + eventKey |
| CompanyPromotionExecutions_createdAt_idx | Performance | Asc | createdAt |
| CompanyPromotionExecutions_eventId_idx | Performance | Asc | eventId |
| CompanyPromotionExecutions_eventKey_idx | Performance | Asc | eventKey |
| CompanyPromotionExecutions_eventTime_idx | Performance | Asc | eventTime |
| CompanyPromotionExecutions_executionMode_idx | Performance | Asc | executionMode |
| CompanyPromotionExecutions_ruleCode_idx | Performance | Asc | ruleCode |
| CompanyPromotionExecutions_status_idx | Performance | Asc | status |
| CompanyPromotionExecutions_trigger_idx | Performance | Asc | trigger |
| CompanyPromotionExecutions_updatedAt_idx | Performance | Asc | updatedAt |

