本卡屬 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/extend/new

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 授權)

怎麼做

驗收(首腦照這個驗)

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 四行格式與既有列一致

必讀