Master Data — Tổng quan
Master Data là nền dữ liệu định danh + cấu hình các domain khác cùng đọc: Enterprise, BusinessUnit, Org/Site, Account, Account Holder, Attendee, Program/Term/TPS/Product và image/profile assets.
Nếu Booking/Subscription/Finance là luồng nghiệp vụ, Master Data là “bản đồ địa hình”: ai thuộc tổ chức nào, site nào active, chương trình nào mở trong term nào, attendee/account nào dùng trong flow.
Hình dung nhanh
Master Data bao phủ những gì?
| Mảng | Một câu |
|---|---|
| Enterprise / BU / Org | Scope tổ chức, site, service area, custom URL và ranh giới dữ liệu. |
| Account / Account Holder | Gia đình/customer account và contact đại diện. |
| Attendee | Trẻ/người tham gia được book, có profile, measurement, requirement và product config. |
| Requirement customization | School Year/Level/Swimming Competency/height/weight hiển thị theo customization cấp BU. |
| Subscription Config | Sys-admin (SuperAdmin BU) gán Subscription + ProductSet cho attendee. |
| Enrollment customization | CustomConsent1..3 và consent fields cấu hình cấp BU trên form enrollment/profile. |
| Program structure | Term, program category, program, TPS, term product/session; capacity từ TermProgramSetCapacity. |
| Site/program links | Site nào mở chương trình nào (OrgProgramCategory), category/rule nào khả dụng. |
| Staff links | Employee/OrgEmployee auto-link staff mới vào site active; archived bị loại. |
| Images/profile assets | Avatar/profile image/system image và crop policy. |
Đọc theo thứ tự
Liên quan
- Booking dùng term/product/attendee/account để tạo order.
- Finance dùng account/attendee/BU/org trên invoice và projection.
- Foundation mô tả aggregate/ownership chung.
- Subscription dùng program/term/enrollment context.
Implementation hiện tại
- Enterprise Portal có Add Business Unit theo Enterprise context; form chỉ gửi field được phép và sau khi tạo chuyển về BU vừa tạo. Business Unit mới dùng provisioning/settings mặc định hiện có.
- Settings bootstrap dùng snapshot theo audience (
Admin/Shared/Customer), resolve scope từ authenticated context; save setting, logo/banner đều invalidate cascade và chống stale repopulation. - Tên/code được normalize ở persistence: trim đầu/cuối; riêng
Account.Namecòn gom whitespace liên tiếp.nullgiữ nguyên, chuỗi chỉ có whitespace thành chuỗi rỗng.
Ví dụ thực tế: Admin tạo BU từ Enterprise hiện tại rồi đổi logo. → BU mới dùng default provisioning; write logo invalidate hierarchy và portal đọc snapshot mới.