Đơn, tiền và hoàn tiền — ERD logic đề xuất

Đơn, tiền và hoàn tiền — ERD logic đề xuất An entity-relationship diagram generated by Archify. Đơn hàng Lần thử và sự kiện Thu và hoàn orders · Entity · Đơn hàng orders PK id owner_guardian_id total_vnd fulfillment_status payment_status order_items · Entity · Đơn hàng order_items PK id FK order_id variant_id sku / price snapshot quantity payment_attempts · Entity · Lần thử và sự kiện payment_attempts PK id FK order_id UK idempotency_key expected_vnd / currency status / expires_at payment_events · Entity · Lần thử và sự kiện payment_events PK id FK attempt_id UK provider_event_key validation / received_at processing_status payment_transactions · Entity · Thu và hoàn payment_transactions PK id FK attempt_id provider / merchant provider_transaction_id amount_vnd / paid_at refunds · Entity · Thu và hoàn refunds PK id FK transaction_id amount_vnd / status requester / approver UK idempotency_key Legend PK Primary key FK Foreign key UK Unique key One Many Optional