feat(health): 补全事件发布 — consent/points/article 6 个领域事件
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled

- consent.granted/revoked: 知情同意授权/撤销
- points.earned/exchanged: 积分获得/兑换
- article.published/rejected: 文章审核发布/拒绝

所有事件通过 EventBus 发布,支持跨模块订阅和审计追溯。
This commit is contained in:
iven
2026-04-27 13:33:11 +08:00
parent a5646ddbb3
commit a36720cbbc
4 changed files with 59 additions and 0 deletions

View File

@@ -12,6 +12,14 @@ pub const APPOINTMENT_CREATED: &str = "appointment.created";
// 告警
pub const ALERT_TRIGGERED: &str = "alert.triggered";
// 知情同意
pub const CONSENT_GRANTED: &str = "consent.granted";
pub const CONSENT_REVOKED: &str = "consent.revoked";
// 文章
pub const ARTICLE_PUBLISHED: &str = "article.published";
pub const ARTICLE_REJECTED: &str = "article.rejected";
// 咨询
pub const CONSULTATION_OPENED: &str = "consultation.opened";
pub const CONSULTATION_CLOSED: &str = "consultation.closed";
@@ -39,6 +47,8 @@ pub const PATIENT_DECEASED: &str = "patient.deceased";
// 积分
pub const POINTS_EXPIRED: &str = "points.expired";
pub const POINTS_EARNED: &str = "points.earned";
pub const POINTS_EXCHANGED: &str = "points.exchanged";
/// 兼容旧签名 — 不做任何实际订阅(逻辑已迁移到 on_startup
pub fn register_handlers(_bus: &EventBus) {