本卡屬 FR-196(母卡 FR-196 母案(同清單上一張)),卡 S-1,第一期批 2。只改 BE(主 repo,Repo 欄空著)。依賴:P-1。
把通知中心需要的「資料」灌進主系統資料庫:23 個事件的型錄(每個事件屬哪類、是否必收、預設走哪些管道、點了跳哪一頁、用哪些 i18n 鍵)、下拉選單用的兩組字典值、兩顆能力點。表本身由 P-1 的套件 SQL 建,本卡把那兩支 SQL 以主線 migration 形式登記進 manifest,再加自己的 seed。🔴 本卡是第一期唯一能動 scripts/sql/manifest.tsv 的卡。做完回寫要明講「出貨基線待重產」。
reuse:seed 先例 scripts/sql/2026-05-22-seed-oscal-ssp-roles.sql(ON CONFLICT DO NOTHING);能力點 seed 照 FR-194 2026-11-10-fr194-ui-routes-entry-gates.sql 的名稱比對寫法;表本身由 P-1 的套件 migration 建,本卡只灌資料,所以本卡要先把 P-1 的 001/002 以主線 manifest 形式登記(照 2026-09-10-fr080-cm1625-bulletin-org-units-soft-ref.sql 套件表隨主線 manifest 走的先例)。link_route 對照(填死不留空):task./stage.entered/scan.critical_found/scan.task_completed → my-tasks(params query:project/job/execution);project. → project-auditor-overview-round(params:id=project_uid、roundUid);agent.* → remote-agent-manage;system.update_available → product-update;license.expiring → license-status;system.maintenance_scheduled → home;account.password_expiring → user-profile;bulletin.published → bulletin-view(params:uid);feedback.replied → home
repo:~/Projects/Billows/Audit-Manager/compliance-manager-be
改既有:scripts/sql/manifest.tsv(🔴 本案第一期唯一 owner:登記 P-1 兩支+本卡兩支,共四行)
新開:scripts/sql/2026-11-12-fr196-notification-center-tables.sql(內容=複製 P-1 的 001+002,主線 manifest 可追)
新開:scripts/sql/2026-11-12-fr196-seed-notification-events.sql(23 列型錄:code/category/mandatory/三個 default/merge_window_sec/link_route/link_params_template/四個 i18n key/sort;兩個 system_menus group;兩顆能力點;Administrator 授權)
migrations/001、002 內容複製成主線 scripts/sql/2026-11-12-fr196-notification-center-tables.sql(檔頭 -- Date:、每句日期註解;照 2026-09-10-fr080-cm1625-bulletin-org-units-soft-ref.sql 套件表隨主線 manifest 的先例)。link_route 對照表在 cards.py 本卡 ren 欄(已填死,不留空);code 用 design.md 表 4-1 的事件代碼+型錄裡沒有寄信點的(task.review_step、project.round_closed、project.closing_report、scan.task_completed、agent.offline、agent.update_failed、agent.update_completed、system.maintenance_scheduled、account.password_expiring、bulletin.published、feedback.replied);四個 i18n key 用 notification_center.events.<code>.title 這種固定形式,F-3 照同形式建 i18n。system_menus:group NOTIFICATION_CATEGORY(task/project/scan_agent/system/bulletin)、NOTIFICATION_DIGEST(immediate/daily/weekly),ON CONFLICT DO NOTHING,先例 2026-05-22-seed-oscal-ssp-roles.sql。notification.inbox.read(全員,掛 Administrator 與一般角色)、notification.banner.publish(Administrator),名稱比對不寫 id,先例 2026-11-10-fr194-ui-routes-entry-gates.sql。active *、seed 標 seed *),說明欄寫清楚。psql --single-transaction -v ON_ERROR_STOP=1 -f 用 cmmgr 只套 DEV;連跑兩次驗冪等。psql --single-transaction -v ON_ERROR_STOP=1 用 cmmgr 只套 DEV 過;select count(*) from public.notification_events=23、mandatory=8;select count(*) from system_menus where "group" in ('NOTIFICATION_CATEGORY','NOTIFICATION_DIGEST')=8;能力點兩顆存在且 Administrator 有;連跑兩次冪等;回寫明講「出貨基線待重產」;manifest 四行格式與既有列一致
~/Projects/Billows/Audit-Manager/compliance-manager-be/docs/features/FR-196-2611-notification-center/design.md §3 決策定案、§5 詳細設計(§5.1 套件職責與 port、§5.2 資料表、§5.3 API、§5.5 前端)、§6 拆卡表本卡那列、§8 風險;討論稿(Artifact,連結在 README)只在想知道「為什麼這樣裁」時看~/Projects/Billows/Audit-Manager/compliance-manager-be/docs/features/FR-196-2611-notification-center/prototype/index.html(四個分頁:鈴鐺、通知中心、通知設定、系統橫幅;純畫面,只取結構與資訊順序;文案依 i18n 重寫)jedi-bulletin/jedi_bulletin/plugin/(contract/assembly/migrations)、jedi-notification/README.md;主系統接線 core/plugins/bulletin.py、core/plugins/_host.py::host_defaults、core/plugins/license.py::TenantAdminDirectory;寄信點 app/flow_engine/service/workflow_execution_service.py:1246、stage_entered_notify_service.py:117、app/task_alert/service/scan_alert_app_service.py:74;既有投遞紀錄表 infra/task_alert/model/task_alert_notification.py;鈴鐺 FE src/layout/AppTopbar.vue 484~540、TopbarStageQueue.vue;seed 先例 scripts/sql/2026-05-22-seed-oscal-ssp-roles.sql、2026-11-10-fr194-ui-routes-entry-gates.sql