Source document
docs/knowledge-index/02-ENTITY-MAP.md
Source version
0.0.0
Generated time
2026-07-06T14:59:18.692Z
Owner
Engineering (Enablement)
Audience
Internal
Status
Approved

02 — ENTITY MAP

Entity/khái niệm chính: definition (1 dòng, canonical ở 04-GLOSSARY) · owner · source of truth (SoT) · implementation status · docs. Chỉ index — không định nghĩa lại dài. Status: ✅ LIVE · 🟡 một phần · ⏳ design.

EntityDefinition (1 dòng)Owner (eng/09)Source of TruthStatusDocs
ReservationĐơn giữ chỗ (aggregate root) của một Unit theo kỳBookingBooking context · bảng reservations✅ LIVEbackend/BOOKING-API, travel-os/03
TenantVùng dữ liệu/cấu hình SaaS của một AccountPlatformIdentity/Tenant · bảng tenants✅ coretravel-os/07, backend/AUTH-TENANT-CONTEXT
AccountKhách hàng doanh nghiệp dùng nền tảng (1 Account ↔ 1 Tenant)Platform/GrowthTenant&Provisioning · bảng customers*🟡 (customers/provisioning)business-os/03, backend/CUSTOMER-PROVISIONING-DESIGN
CustomerKhách du lịch/end-user đặt qua tenantGrowthCustomer context (customer_profiles*)⏳ designtravel-os/03, business-os/00
PartnerĐơn vị lưu trú/nhà cung cấp đưa inventorySupplyPartner context (partners*)⏳ designtravel-os/03, travel-os/08
ListingChỗ bán được (Reservable) của tenantSupplyCatalog · bảng listings✅ LIVEbackend/BOOKING-API, travel-os/03
UnitĐơn vị đặt được thuộc Listing (phòng/bàn/ghế/gói)SupplyCatalog · bảng units✅ LIVEbackend/BOOKING-API
AvailabilityTồn kho tổng theo Unit (điểm khoá chống overbook)SupplyCatalog · bảng availability✅ LIVEbackend/BOOKING-API, travel-os/03
PricingGiá mỗi Unit/kỳ (MVP: phẳng)SupplyPricing · bảng prices✅ LIVE (phẳng)travel-os/03, business-os/05
PaymentThu/hoàn/payout + ledgerPaymentsPayment context (payments*)⏳ designtravel-os/05, travel-os/04
AffiliateReferral + commission cho CustomerGrowthAffiliate context (affiliates*)⏳ designtravel-os/03, business-os/04
UserTài khoản đăng nhập (staff/partner-admin), thuộc nhiều tenantPlatformIdentity · bảng users, tenant_memberships✅ LIVE (2U)backend/AUTH-GATEWAY
SessionPhiên đăng nhập (nguồn revocation), JWT tham chiếuPlatformIdentity · bảng user_sessions✅ LIVE (2U)backend/AUTH-GATEWAY
API KeyBí mật server-to-server → tenant contextPlatformIdentity · bảng api_keys✅ LIVEbackend/AUTH-TENANT-CONTEXT, OPS-CLI
Outbox EventDomain event lưu cùng transaction (at-least-once)PlatformEvent Bus · bảng outbox_events✅ LIVEbackend/OUTBOX-HANDLERS, travel-os/04
NotificationYêu cầu + gửi đa kênh (console→provider thật)PlatformNotification context🟡 interface+consolebackend/NOTIFICATION-PROVIDERS
Travel IntelligenceSearch/rank/recommend/trust (consume-only)AI/TrustIntelligence (feature store/index)⏳ designtravel-os/09, product-management/AI-READINESS
Medical TourismVertical y tế: case/package/compliance (PHI cô lập)MedicalMedical context (medical_**)⏳ designplatform/MEDICAL-TOURISM-INTEGRATION, travel-os/07 tiers

* = bảng dự kiến (chưa tạo). Danh sách bảng đã tạo thực tế: tenants, listings, units, availability, prices, reservations, idempotency_keys, api_keys, customers, provisioning, outbox_events, users, tenant_memberships, user_sessions.

Ghi chú tránh nhầm (canonical ở 04-GLOSSARY)