Master Data — Kiến trúc & dữ liệu
Dòng phụ thuộc
Master Data được đọc rộng, nhưng mutation phải đi qua owner đúng. Ví dụ update profile image của account holder là update Contact, không thêm field avatar vào Account.
Boundary rules
| Rule | Ý nghĩa |
|---|---|
| BU là security/config boundary | Query token/payment/customer/account phải scope theo BU khi nghiệp vụ yêu cầu. |
| Account Holder là Contact | “Account holder avatar” thuộc Contact.ProfileImage, không thuộc Account. |
| Program setup khác booking runtime | Sửa TPS/TermProduct không tự sửa booking đã confirm nếu không có flow migration/adjustment rõ. |
| Image crop policy theo field | Avatar 1:1; wide course/activity image 16:9; generic file upload được exempt. |
| Site/program link ảnh hưởng availability | Booking/payment/subscription đọc config này để expose option, không tự sở hữu config. |
Dữ liệu chính
| Nhóm | Dữ liệu |
|---|---|
| Organization | Enterprise, BusinessUnit, Org, site relationship, custom URL. |
| Customer | Account, BusinessUnitAccount, Contact, account holder relationship. |
| Attendee | Attendee, measurements, profile/system image, product config. |
| Program | Term, ProgramCategory, Program, TermProgramSet, TermProduct. |
| Links/settings | Site-program category link, booking rule options, category payment option. |
Event side effects
Nhiều master data change có thể publish EntityEvent để Platform sinh history/notification hoặc để projections refresh. Event không chuyển ownership; owner vẫn là aggregate gốc.