Skip to content

Event Programs — Business Rules

Tổng quan

Domain này gom 3 family event lớn trong CMS:

  • accumulation event
  • lucky draw event
  • gift event

Ba family cùng dùng shell event_management, nhưng workflow, model thưởng và runtime nhận quà khác nhau rõ rệt. Đây là phần "mini product" nhất của toàn module cms.

Scope nghiệp vụ

NhómVai tròSurface chính
AccumulationTích lũy điểm/doanh thu để mở thưởng theo mốcevent/accumulation/*
Lucky drawVòng quay, wheel, reward, claim, customer detailevent/lucky-draw/*
Gift eventNhóm quà, điều kiện nhận, notification config, popupevent/gift-event/*

Luồng chính

text
Ops tạo event
  -> chọn event type
  -> cấu hình thời gian, assignees, order types, rules
  -> cấu hình reward model riêng cho từng family
  -> publish/chạy event
  -> theo dõi customer participation, claim, payout, popup/noti side effects

Quy tắc nghiệp vụ

Quy tắc
BR-CEP-001Cả 3 event family cùng dùng route shell event_management, nhưng data model không đồng nhất; accumulation, lucky draw và gift event không chỉ là variant UI của cùng một entity đơn giản.
BR-CEP-002Lucky draw có mô hình wheel -> reward -> detail -> claims/results, khác rõ với accumulation reward theo threshold.
BR-CEP-003Gift event có thêm event_notification_configs, manual_template, send_config, stop_config, nên event không chỉ phát thưởng mà còn orchestration thông báo.
BR-CEP-004Event customer detail là read model quan trọng để vận hành, vì reward eligibility và accumulated points không thể suy ra an toàn chỉ từ event header.
BR-CEP-005Event rules được render thành HTML-like business description (RuleGenerate), cho thấy FE đang giữ một phần presentation logic của điều lệ sự kiện.

Boundary

BoundaryGhi chú
notificationGift event cấu hình notification/ZNS/SMS body và sending conditions
wallet / reward payoutMột số phần thưởng đi vào ví hoặc hiện popup reward
ecommerceEvent participation và order accumulation bám vào order data
reportEvent analytics/drill-down có thể được tiêu thụ từ report hoặc ops dashboards

Rủi ro / Findings

MứcFinding
P1configs cho nhiều route event create/update/detail đang để permissions: [] và chỉ dựa vào moduleId = event_management; rule đọc quyền của nhánh event không trực quan.
P1GiftEventCreate.tsx hiện xử lý create path rõ, nhưng chưa thấy nhánh update tương ứng dù ROUTE_GIFT_EVENT_UPDATE vẫn mount cùng file.
P2Event domain chứa rất nhiều form/popup/detail component riêng theo subtype; nếu chỉ đọc overview module rất dễ đánh giá thấp độ phức tạp thực.