Warranty & Claims — Data model
14 tables · auto-generated from migrations-v2/*.sql — do not edit by hand.
ER diagram
%%{init: {"theme":"base","themeVariables":{"darkMode":true,"background":"#1e1e1e","primaryColor":"#2d2d30","primaryBorderColor":"#569cd6","primaryTextColor":"#d4d4d4","lineColor":"#6796c6","secondaryColor":"#3a3d41","secondaryBorderColor":"#dcdcaa","secondaryTextColor":"#d4d4d4","tertiaryColor":"#252526","tertiaryBorderColor":"#569cd6","noteBkgColor":"#3a3d41","noteTextColor":"#dcdcaa","clusterBkg":"#252526","clusterBorder":"#569cd6","titleColor":"#569cd6","attributeBackgroundColorOdd":"#252526","attributeBackgroundColorEven":"#2d2d30"},"er":{"useMaxWidth":false}}}%%
erDiagram
CLAIMS_WARRANTY_CASE {
integer id PK
text company_id FK
integer claimant_party_id FK
text claim_no
text channel
text claim_date
text status
text operational_status
}
CLAIMS_WARRANTY_CLAIM_LINE {
integer id PK
text company_id FK
integer claim_case_id FK
integer item_id FK
integer item_variant_id FK
integer warranty_registration_id FK
integer line_no
text serial_code
}
CLAIMS_WARRANTY_ENTITLEMENT_CHECK {
integer id PK
text company_id FK
integer claim_line_id FK
integer warranty_registration_id FK
text claim_date
text warranty_expiry
text verdict
text basis_snapshot
}
CLAIMS_WARRANTY_EVENT_LOG {
integer id PK
text company_id FK
integer claim_case_id FK
integer claim_line_id FK
text event_type
text actor
text payload_digest
integer customer_visible
}
CLAIMS_WARRANTY_POLICY {
integer id PK
text company_id FK
text code
text name
text duration_formula
text start_trigger
text coverage_matrix
text replacement_carryover
}
CLAIMS_WARRANTY_REGISTRATION {
integer id PK
text company_id FK
integer identity_bundle_line_id FK
integer item_id FK
integer item_variant_id FK
integer owner_party_id FK
integer policy_id FK
text serial_code
}
CLAIMS_WARRANTY_REPAIR_ORDER {
integer id PK
text company_id FK
integer claim_line_id FK
text repair_no
text repair_state
numeric cost_amount
text currency_code
text notes
}
CLAIMS_WARRANTY_REPLACEMENT_ORDER {
integer id PK
text company_id FK
integer claim_line_id FK
integer issue_stock_document_id FK
integer from_location_id FK
integer item_variant_id FK
text replacement_no
text old_serial_code
}
CLAIMS_WARRANTY_RESOLUTION {
integer id PK
text company_id FK
integer claim_line_id FK
integer stock_document_id FK
integer journal_document_id FK
text resolution_kind
text resolution_status
numeric amount
}
CLAIMS_WARRANTY_RMA_STOCK_MOVEMENT {
integer id PK
text company_id FK
integer claim_line_id FK
integer stock_document_id FK
integer from_location_id FK
integer hold_location_id FK
integer item_variant_id FK
text operation_group
}
CLAIMS_WARRANTY_SUPPLIER_CLAIM {
integer id PK
text company_id FK
integer supplier_party_id FK
text supplier_claim_no
text expected_recovery_kind
text state
text created_by
integer created_at
}
CLAIMS_WARRANTY_SUPPLIER_CLAIM_LINE {
integer id PK
text company_id FK
integer supplier_claim_id FK
integer claim_line_id FK
integer item_id FK
integer item_variant_id FK
text serial_code
text origin_grn_line_ref
}
CLAIMS_WARRANTY_TRANSFER {
integer id PK
text company_id FK
integer warranty_registration_id FK
integer from_owner_party_id FK
integer to_owner_party_id FK
text serial_code
text warranty_start
text warranty_expiry
}
CLAIMS_WARRANTY_TRIAGE_DECISION {
integer id PK
text company_id FK
integer claim_line_id FK
text decision
text rationale
text coverage_snapshot
text spawned_refs
text decided_by
}
CLAIMS_WARRANTY_CASE ||--o{ CLAIMS_WARRANTY_CLAIM_LINE : claim_case
CLAIMS_WARRANTY_REGISTRATION ||--o{ CLAIMS_WARRANTY_CLAIM_LINE : warranty_registration
CLAIMS_WARRANTY_CLAIM_LINE ||--o{ CLAIMS_WARRANTY_ENTITLEMENT_CHECK : claim_line
CLAIMS_WARRANTY_REGISTRATION ||--o{ CLAIMS_WARRANTY_ENTITLEMENT_CHECK : warranty_registration
CLAIMS_WARRANTY_CASE ||--o{ CLAIMS_WARRANTY_EVENT_LOG : claim_case
CLAIMS_WARRANTY_CLAIM_LINE ||--o{ CLAIMS_WARRANTY_EVENT_LOG : claim_line
CLAIMS_WARRANTY_POLICY ||--o{ CLAIMS_WARRANTY_REGISTRATION : policy
CLAIMS_WARRANTY_CLAIM_LINE ||--o{ CLAIMS_WARRANTY_REPAIR_ORDER : claim_line
CLAIMS_WARRANTY_CLAIM_LINE ||--o{ CLAIMS_WARRANTY_REPLACEMENT_ORDER : claim_line
CLAIMS_WARRANTY_CLAIM_LINE ||--o{ CLAIMS_WARRANTY_RESOLUTION : claim_line
CLAIMS_WARRANTY_CLAIM_LINE ||--o{ CLAIMS_WARRANTY_RMA_STOCK_MOVEMENT : claim_line
CLAIMS_WARRANTY_SUPPLIER_CLAIM ||--o{ CLAIMS_WARRANTY_SUPPLIER_CLAIM_LINE : supplier_claim
CLAIMS_WARRANTY_CLAIM_LINE ||--o{ CLAIMS_WARRANTY_SUPPLIER_CLAIM_LINE : claim_line
CLAIMS_WARRANTY_REGISTRATION ||--o{ CLAIMS_WARRANTY_TRANSFER : warranty_registration
CLAIMS_WARRANTY_CLAIM_LINE ||--o{ CLAIMS_WARRANTY_TRIAGE_DECISION : claim_line
Cross-module references
CLAIMS_WARRANTY_CASE.company_id → COMPANY (core)
CLAIMS_WARRANTY_CASE.claimant_party_id → PARTY (core)
CLAIMS_WARRANTY_CLAIM_LINE.company_id → COMPANY (core)
CLAIMS_WARRANTY_CLAIM_LINE.item_id → ITEM (core)
CLAIMS_WARRANTY_CLAIM_LINE.item_variant_id → ITEM_VARIANT (core)
CLAIMS_WARRANTY_ENTITLEMENT_CHECK.company_id → COMPANY (core)
CLAIMS_WARRANTY_EVENT_LOG.company_id → COMPANY (core)
CLAIMS_WARRANTY_POLICY.company_id → COMPANY (core)
CLAIMS_WARRANTY_REGISTRATION.company_id → COMPANY (core)
CLAIMS_WARRANTY_REGISTRATION.identity_bundle_line_id → IDENTITY_BUNDLE_LINE (core)
CLAIMS_WARRANTY_REGISTRATION.item_id → ITEM (core)
CLAIMS_WARRANTY_REGISTRATION.item_variant_id → ITEM_VARIANT (core)
CLAIMS_WARRANTY_REGISTRATION.owner_party_id → PARTY (core)
CLAIMS_WARRANTY_REPAIR_ORDER.company_id → COMPANY (core)
CLAIMS_WARRANTY_REPLACEMENT_ORDER.company_id → COMPANY (core)
CLAIMS_WARRANTY_REPLACEMENT_ORDER.issue_stock_document_id → DOCUMENT (core)
CLAIMS_WARRANTY_REPLACEMENT_ORDER.from_location_id → LOCATION (core)
CLAIMS_WARRANTY_REPLACEMENT_ORDER.item_variant_id → ITEM_VARIANT (core)
CLAIMS_WARRANTY_RESOLUTION.company_id → COMPANY (core)
CLAIMS_WARRANTY_RESOLUTION.stock_document_id → DOCUMENT (core)
CLAIMS_WARRANTY_RESOLUTION.journal_document_id → DOCUMENT (core)
CLAIMS_WARRANTY_RMA_STOCK_MOVEMENT.company_id → COMPANY (core)
CLAIMS_WARRANTY_RMA_STOCK_MOVEMENT.stock_document_id → DOCUMENT (core)
CLAIMS_WARRANTY_RMA_STOCK_MOVEMENT.from_location_id → LOCATION (core)
CLAIMS_WARRANTY_RMA_STOCK_MOVEMENT.hold_location_id → LOCATION (core)
CLAIMS_WARRANTY_RMA_STOCK_MOVEMENT.item_variant_id → ITEM_VARIANT (core)
CLAIMS_WARRANTY_SUPPLIER_CLAIM.company_id → COMPANY (core)
CLAIMS_WARRANTY_SUPPLIER_CLAIM.supplier_party_id → PARTY (core)
CLAIMS_WARRANTY_SUPPLIER_CLAIM_LINE.company_id → COMPANY (core)
CLAIMS_WARRANTY_SUPPLIER_CLAIM_LINE.item_id → ITEM (core)
CLAIMS_WARRANTY_SUPPLIER_CLAIM_LINE.item_variant_id → ITEM_VARIANT (core)
CLAIMS_WARRANTY_TRANSFER.company_id → COMPANY (core)
CLAIMS_WARRANTY_TRANSFER.from_owner_party_id → PARTY (core)
CLAIMS_WARRANTY_TRANSFER.to_owner_party_id → PARTY (core)
CLAIMS_WARRANTY_TRIAGE_DECISION.company_id → COMPANY (core)
Data dictionary
erp_claims_warranty_case · 16 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| claim_no |
text |
|
|
| claimant_party_id |
integer |
FK |
erp_party |
| channel |
text |
|
|
| claim_date |
text |
|
|
| status |
text |
|
|
| operational_status |
text |
|
|
| sla_policy_code |
text |
|
|
| response_due |
text |
|
|
| resolution_due |
text |
|
|
| sla_due |
text |
|
|
| public_track_token |
text |
|
|
| summary |
text |
|
|
| created_by |
text |
|
|
| created_at |
integer |
|
|
erp_claims_warranty_claim_line · 13 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| claim_case_id |
integer |
FK |
erp_claims_warranty_case |
| line_no |
integer |
|
|
| item_id |
integer |
FK |
erp_item |
| item_variant_id |
integer |
FK |
erp_item_variant |
| serial_code |
text |
|
|
| warranty_registration_id |
integer |
FK |
erp_claims_warranty_registration |
| reported_symptom |
text |
|
|
| entitlement_status |
text |
|
|
| line_status |
text |
|
|
| disposition |
text |
|
|
| created_at |
integer |
|
|
erp_claims_warranty_entitlement_check · 11 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| claim_line_id |
integer |
FK |
erp_claims_warranty_claim_line |
| warranty_registration_id |
integer |
FK |
erp_claims_warranty_registration |
| claim_date |
text |
|
|
| warranty_expiry |
text |
|
|
| verdict |
text |
|
|
| basis_snapshot |
text |
|
|
| clear_error |
text |
|
|
| computed_by |
text |
|
|
| created_at |
integer |
|
|
erp_claims_warranty_event_log · 9 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| claim_case_id |
integer |
FK |
erp_claims_warranty_case |
| claim_line_id |
integer |
FK |
erp_claims_warranty_claim_line |
| event_type |
text |
|
|
| actor |
text |
|
|
| payload_digest |
text |
|
|
| customer_visible |
integer |
|
|
| created_at |
integer |
|
|
erp_claims_warranty_policy · 11 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| code |
text |
|
|
| name |
text |
|
|
| duration_formula |
text |
|
|
| start_trigger |
text |
|
|
| coverage_matrix |
text |
|
|
| replacement_carryover |
text |
|
|
| terms_snapshot |
text |
|
|
| status |
text |
|
|
| created_at |
integer |
|
|
erp_claims_warranty_registration · 19 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| serial_code |
text |
|
|
| identity_bundle_line_id |
integer |
FK |
erp_identity_bundle_line |
| item_id |
integer |
FK |
erp_item |
| item_variant_id |
integer |
FK |
erp_item_variant |
| owner_party_id |
integer |
FK |
erp_party |
| policy_id |
integer |
FK |
erp_claims_warranty_policy |
| warranty_start |
text |
|
|
| warranty_expiry |
text |
|
|
| duration_formula |
text |
|
|
| source |
text |
|
|
| origin_doctype |
text |
|
|
| origin_doc_id |
text |
|
|
| origin_line_id |
text |
|
|
| terms_snapshot |
text |
|
|
| status |
text |
|
|
| created_by |
text |
|
|
| created_at |
integer |
|
|
erp_claims_warranty_repair_order · 10 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| claim_line_id |
integer |
FK |
erp_claims_warranty_claim_line |
| repair_no |
text |
|
|
| repair_state |
text |
|
|
| cost_amount |
numeric |
|
|
| currency_code |
text |
|
|
| notes |
text |
|
|
| created_by |
text |
|
|
| created_at |
integer |
|
|
erp_claims_warranty_replacement_order · 14 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| claim_line_id |
integer |
FK |
erp_claims_warranty_claim_line |
| replacement_no |
text |
|
|
| old_serial_code |
text |
|
|
| new_serial_code |
text |
|
|
| issue_stock_document_id |
integer |
FK |
erp_document |
| from_location_id |
integer |
FK |
erp_location |
| item_variant_id |
integer |
FK |
erp_item_variant |
| qty |
numeric |
|
|
| state |
text |
|
|
| warranty_carryover_snapshot |
text |
|
|
| created_by |
text |
|
|
| created_at |
integer |
|
|
erp_claims_warranty_resolution · 13 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| claim_line_id |
integer |
FK |
erp_claims_warranty_claim_line |
| resolution_kind |
text |
|
|
| resolution_status |
text |
|
|
| amount |
numeric |
|
|
| currency_code |
text |
|
|
| stock_document_id |
integer |
FK |
erp_document |
| journal_document_id |
integer |
FK |
erp_document |
| external_ref |
text |
|
|
| notes |
text |
|
|
| created_by |
text |
|
|
| created_at |
integer |
|
|
erp_claims_warranty_rma_stock_movement · 12 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| claim_line_id |
integer |
FK |
erp_claims_warranty_claim_line |
| stock_document_id |
integer |
FK |
erp_document |
| operation_group |
text |
|
|
| from_location_id |
integer |
FK |
erp_location |
| hold_location_id |
integer |
FK |
erp_location |
| item_variant_id |
integer |
FK |
erp_item_variant |
| serial_code |
text |
|
|
| qty |
numeric |
|
|
| created_by |
text |
|
|
| created_at |
integer |
|
|
erp_claims_warranty_supplier_claim · 8 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| supplier_claim_no |
text |
|
|
| supplier_party_id |
integer |
FK |
erp_party |
| expected_recovery_kind |
text |
|
|
| state |
text |
|
|
| created_by |
text |
|
|
| created_at |
integer |
|
|
erp_claims_warranty_supplier_claim_line · 13 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| supplier_claim_id |
integer |
FK |
erp_claims_warranty_supplier_claim |
| claim_line_id |
integer |
FK |
erp_claims_warranty_claim_line |
| item_id |
integer |
FK |
erp_item |
| item_variant_id |
integer |
FK |
erp_item_variant |
| serial_code |
text |
|
|
| origin_grn_line_ref |
text |
|
|
| reason_code |
text |
|
|
| claimed_value |
numeric |
|
|
| recovered_value |
numeric |
|
|
| line_state |
text |
|
|
| created_at |
integer |
|
|
erp_claims_warranty_transfer · 12 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| warranty_registration_id |
integer |
FK |
erp_claims_warranty_registration |
| serial_code |
text |
|
|
| from_owner_party_id |
integer |
FK |
erp_party |
| to_owner_party_id |
integer |
FK |
erp_party |
| warranty_start |
text |
|
|
| warranty_expiry |
text |
|
|
| transfer_reason |
text |
|
|
| evidence_ref |
text |
|
|
| created_by |
text |
|
|
| created_at |
integer |
|
|
erp_claims_warranty_triage_decision · 9 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| claim_line_id |
integer |
FK |
erp_claims_warranty_claim_line |
| decision |
text |
|
|
| rationale |
text |
|
|
| coverage_snapshot |
text |
|
|
| spawned_refs |
text |
|
|
| decided_by |
text |
|
|
| created_at |
integer |
|
|