feat(M08-B): 接入保洁任务端基础流程

This commit is contained in:
Codex
2026-06-25 23:19:04 +08:00
parent 9f7c2e4be7
commit 2a4dcd0fd8
19 changed files with 1081 additions and 10 deletions
+21 -1
View File
@@ -81,6 +81,9 @@ const benefitVerifySql = read('database/migrations/2026062423_m07c_benefits.veri
const rechargeWechatUpSql = read('database/migrations/2026062524_m08a_recharge_wechat.up.sql');
const rechargeWechatDownSql = read('database/migrations/2026062524_m08a_recharge_wechat.down.sql');
const rechargeWechatVerifySql = read('database/migrations/2026062524_m08a_recharge_wechat.verify.sql');
const cleaningUpSql = read('database/migrations/2026062525_m08b_cleaner_tasks.up.sql');
const cleaningDownSql = read('database/migrations/2026062525_m08b_cleaner_tasks.down.sql');
const cleaningVerifySql = read('database/migrations/2026062525_m08b_cleaner_tasks.verify.sql');
const coreTables = [
'qipai_schema_migrations',
@@ -378,4 +381,21 @@ assert.match(rechargeWechatDownSql, /DROP COLUMN provider_payment_id/);
assert.match(rechargeWechatVerifySql, /'provider_payment_id'/);
assert.match(rechargeWechatVerifySql, /'uq_qipai_recharge_provider_callback'/);
console.log('PASS: M01-B through M08-A migration contracts are present.');
for (const table of ['qipai_cleaning_tasks', 'qipai_cleaning_task_events']) {
assert.match(cleaningUpSql, new RegExp(`CREATE TABLE IF NOT EXISTS ${table}`));
assert.match(cleaningDownSql, new RegExp(`DROP TABLE IF EXISTS ${table}`));
assert.match(cleaningVerifySql, new RegExp(`'${table}'`));
}
for (const status of [
'WAITING', 'CLAIMED', 'STARTED', 'SUBMITTED', 'COMPLETED',
'REJECTED', 'EXEMPT', 'SETTLED', 'CANCELLED'
]) {
assert.match(cleaningUpSql, new RegExp(status));
}
assert.match(cleaningUpSql, /cleaner_user_id BIGINT UNSIGNED NULL/);
assert.match(cleaningUpSql, /photo_urls_json JSON NOT NULL/);
assert.match(cleaningUpSql, /uq_qipai_cleaning_task_order/);
assert.match(cleaningUpSql, /cleaning\.task\.write/);
assert.match(cleaningUpSql, /cleaning\.statistics\.read/);
console.log('PASS: M01-B through M08-B migration contracts are present.');