Dashboard / Telemetry — Dữ liệu & bảng đọc/ghi
Góc nhìn database và khái niệm ngoài mà Dashboard đọc. Quy ước: 📖 READ, ✏️ WRITE (insert/update).
Dashboard là read-only aggregate: không ghi bảng domain nào. Nguồn dữ liệu đều từ domain khác; thao tác ghi duy nhất là ghi telemetry (out-of-band, không phải dữ liệu domain).
Dữ liệu đọc
| Mảng | Dữ liệu |
|---|---|
| Booking metrics | TermBooking (StatusId, BillingId), TermBookingOrder (StatusId=300) 📖 READ — nguồn revenue/booking stats. |
| Attendance | TermAttendance (RollCallStatusId, SignInKeyedOn, AttendeeId) 📖 READ — nguồn onsite/hourly flow. |
| Account/Attendee | BusinessUnitAccount, BusinessUnitAttendee, Org_Account, Org_Attendee 📖 READ — membership + site assignment. |
| Site/BU scope | BusinessUnit (active), Org (site active) 📖 READ — validate scope BU/site. |
| Program | Program (Capacity), ProgramCategory 📖 READ — grouping booking theo category. |
| Cache | Cache key/TTL của DashboardCacheService (Redis/in-memory) — không invalidation theo sự kiện. |
Ghi ngoài bảng domain
| Mảng | Dữ liệu |
|---|---|
| Telemetry | Application Insights: AuthenticatedUserId + custom property userName ✏️ WRITE (chỉ vào telemetry, không vào bảng domain). |
Data từ domain khác
| Domain | Dashboard đọc để làm gì |
|---|---|
| Booking | TermBooking/TermBookingOrder StatusId + BillingId cho revenue/booking stats. |
| Master Data | BusinessUnit, Org/Site, Account, Attendee, Program/Category để scope và group. |
| Nền tảng | IANA timezone của BU cho HourlyFlow/peak hour và DST. |
Liên quan
- Kiến trúc & dữ liệu — cache TTL, validation, timezone, telemetry.
- Booking — trạng thái và nguồn dữ liệu booking.