Skip to content

Dịch vụ & Lịch hẹn — Technical Map

Boundary map

LớpOwner chính
Service config / commission configsettings module + role_commission
Runtime order item / appointmentecommerce
Project task / assignee / tour moneyproject source + ecommerce-api events
Reminder / CRM follow-upecommerce-api schedulers + CRM schedulers
Downstream doctor / working schedulehrm touchpoint

Route / moduleId map

Route / groupModuleId / owner
/e/service-order/*service_order
/e/appointment*appointment_management
Settings service pagesservice_list trong settings

Bảng cốt lõi

BảngDBVai trò
productecommerceService master
product_relationecommerceSubtask, default_subtask, tour limit
role_commissionecommerce/settingsCommission config
order_itemecommercePurchased service item
appointment, appointment_userecommerceRuntime appointment
order_service_tour_overrideecommerceOverride limit theo order item
project_task, project_task_assigneeprojectTour execution + tour money
request_working_schedulehrmDownstream approval touchpoint

GraphQL / event / scheduler chính

Thành phầnFileVai trò
GraphQLappointment.graphqlAppointment query/update
GraphQLorder.graphqlGetListTourLimit, UpdateTourLimitSubtask
GraphQLprojects/project.graphqlProject task fragments/touchpoints
GraphQLsettings/commission_setting.graphqlService commission config
Eventappointment_insert.goSinh project_task + default subtasks
Eventappointment_update.goConfirm/complete/cancel flow
Eventorder_insert.goSeed order_service_tour_override
Eventproject_task_assignee_insert.goAuto-fill tour_money
Eventproject_task_assignee_update.goLimit guard / reset tour_money
Schedulerappointment_reminder.goIn-app reminder
Schedulerappointment_service_reminder_sms.goSMS/ZNS reminder
Schedulerappointment_consultant_reminder_sms.goConsultation reminder

Sequence thực tế

text
Service config (settings)
  -> service order insert
  -> order_insert event seed override
  -> appointment insert
  -> appointment_insert event create project_task
  -> project_task_assignee insert/update
  -> reminder / CRM / HRM downstream

Tour limit resolution

Mức ưu tiênNguồn
1order_service_tour_override.tour_limit_subtask
2product_relation.tour_limit_subtask
3product.tour_limit / runtime total context

GetListTourLimit là action quan trọng để merge override và tính counted-vs-actual times.

Reminder & CRM touchpoints

LuồngVai trò
appointment_reminderIn-app reminder theo app settings
appointment_service_reminder_smsReminder service 24h trước
appointment_consultant_reminder_smsReminder consultant
consolidate_ticket_4, remind_ticket_tomorrowCRM follow-up liên quan

Rủi ro / Findings kỹ thuật

MứcMô tả
P1Nếu coi projects là microservice Go riêng cho tour thì sai; phần lớn behavior đang là Hasura source + ecommerce events.
P1cancel_reason trong appointment FE có nguy cơ không persist.
P1Tour limit enforcement không đối xứng hoàn toàn giữa insert và update assignee path.
P2Reminder service dedupe theo customer hơn là theo từng appointment.