feat(M10-A): 完成统一通知中心与投递闭环

This commit is contained in:
Codex
2026-08-11 09:17:18 +08:00
parent 41b9cf7349
commit 5d70114bab
46 changed files with 1724 additions and 74 deletions
+25 -1
View File
@@ -147,6 +147,15 @@ const productStorageDownSql = read(
const productStorageVerifySql = read(
'database/migrations/2026081109_m09d3_product_storage.verify.sql'
);
const notificationUpSql = read(
'database/migrations/2026081110_m10a_notification_center.up.sql'
);
const notificationDownSql = read(
'database/migrations/2026081110_m10a_notification_center.down.sql'
);
const notificationVerifySql = read(
'database/migrations/2026081110_m10a_notification_center.verify.sql'
);
const coreTables = [
'qipai_schema_migrations',
@@ -727,4 +736,19 @@ assert.match(productStorageUpSql, /r\.code IN \('STAFF', 'STORE_ADMIN', 'TENANT_
assert.match(productStorageVerifySql, /fully_granted_goods_storage_roles/);
assert.match(productStorageVerifySql, /'2026081109'/);
console.log('PASS: M01-B through M09-D3 migration contracts are present.');
for (const table of ['qipai_notification_templates', 'qipai_notification_routes',
'qipai_notification_subscriptions', 'qipai_notification_deliveries',
'qipai_notification_attempts']) {
assert.match(notificationUpSql, new RegExp(`CREATE TABLE IF NOT EXISTS ${table}\\b`));
assert.match(notificationDownSql, new RegExp(`DROP TABLE IF EXISTS ${table}\\b`));
assert.match(notificationVerifySql, new RegExp(`'${table}'`));
}
assert.match(notificationUpSql, /scope_store_id BIGINT UNSIGNED GENERATED ALWAYS AS \(COALESCE\(store_id, 0\)\) STORED/);
assert.match(notificationUpSql, /uq_qipai_notification_delivery_idempotency/);
assert.match(notificationUpSql, /qipai_notification_attempts_no_update/);
assert.match(notificationUpSql, /qipai_notification_attempts_no_delete/);
assert.match(notificationUpSql, /'notification\.read'/);
assert.match(notificationUpSql, /'notification\.manage'/);
assert.match(notificationVerifySql, /'2026081110'/);
console.log('PASS: M01-B through M10-A migration contracts are present.');