Database Overview
แต่ละ backend service มี ApplicationDbContext ของตัวเอง ทำให้ ownership ของข้อมูลชัดเจน
Booking Service
| DbSet | ความหมาย |
|---|---|
Bookings, BookingInfos | Header และ version/detail ของ booking |
BookingInfoCars, BookingInfoContactPersons, BookingInfoDrivers | Snapshot ของรถ ผู้ติดต่อ และผู้ขับ |
BookingInfoAddons, BookingInfoFuelServices | Add-on และ fuel service ที่เลือกใน booking |
BookingPaymentTransactions, BookingPaymentInfos | ข้อมูล payment ที่เกี่ยวข้องกับ booking |
Refunds, RefundInfos, RefundAllocations, RefundTransactions | Refund lifecycle |
Cars, Branches, Customers, AddOns, Users | Snapshot/replicated data ที่ booking ต้องอ้างอิง |
EmailQueues, CancellationReasons, BookingPolicies, RunningNumbers | Supporting tables |
Catalog Service
| DbSet | ความหมาย |
|---|---|
Cars, CarImages, CarCarProSyncs, CarProSyncLogs | Car catalog และ sync log |
Branches, BranchCarProSyncs, BranchCarProSchedules | Branch catalog และ sync schedule |
AddOns, AddOnCarProSyncs | Insurance/extra services |
Fuels | Fuel service price |
Promotions, CarouselImages, PageBannerImages | Marketing content |
OneWayRentals, OneWayReturns, OneWayReturnRanges | One-way rental pricing/rules |
Users | Audit/update ownership |
User Service
| DbSet | ความหมาย |
|---|---|
Users, Roles, RolePermissions | Backoffice RBAC |
Customers, Groups, Tiers, SocialLogins | Customer profile และ segmentation |
CustomerActivationLogs | ประวัติการเปิด/ปิดสถานะ customer |
Titles | Master data คำนำหน้า |
BookingPolicies, RegisterPolicies, CustomerPolicyAcceptances | Term/policy และ consent |
Payment Service
| DbSet | ความหมาย |
|---|---|
PaymentTransactions | Transaction หลักของ payment |
SavedPaymentMethods | วิธีชำระเงินที่บันทึกไว้ |
Customers, Bookings, BookingInfos | Snapshot ที่ payment ใช้อ้างอิง |
BankMasterdatas | Master data ธนาคาร |