feat: 累积功能变更 — 聊天集成、租户管理、小程序更新、ETL 增强、迁移脚本

包含多个会话的累积代码变更:
- backend: AI 聊天服务、触发器调度、认证增强、WebSocket、调度器最小间隔
- admin-web: ETL 状态页、任务管理、调度配置、登录优化
- miniprogram: 看板页面、聊天集成、UI 组件、导航更新
- etl: DWS 新任务(finance_area_daily/board_cache)、连接器增强
- tenant-admin: 项目初始化
- db: 19 个迁移脚本(etl_feiqiu 11 + zqyy_app 8)
- packages/shared: 枚举和工具函数更新
- tools: 数据库工具、报表生成、健康检查
- docs: PRD/架构/部署/合约文档更新

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Neo
2026-04-06 00:03:48 +08:00
parent 70324d8542
commit 6f8f12314f
515 changed files with 76604 additions and 7456 deletions

View File

@@ -0,0 +1,60 @@
/**
* Property 16: 响应格式一致性(前端 fast-check
*
* 验证:
* - 成功响应符合 { code: 0, data } 格式
* - 错误响应符合 { code: number, message: string } 格式
* - 分页响应 data 包含 items/total/page/pageSize
*
* **验证: 需求 18.4**
*
* 注意:此文件为骨架,需安装 fast-check 后运行。
* pnpm add -D fast-check
*/
// import * as fc from "fast-check";
// import { describe, it, expect } from "vitest";
// describe("Property 16: API 响应格式一致性", () => {
// it("成功响应包含 code=0 和 data 字段", () => {
// fc.assert(
// fc.property(fc.anything(), (data) => {
// const response = { code: 0, data };
// expect(response).toHaveProperty("code", 0);
// expect(response).toHaveProperty("data");
// }),
// );
// });
//
// it("错误响应包含 code>0 和 message 字段", () => {
// fc.assert(
// fc.property(
// fc.integer({ min: 1 }),
// fc.string({ minLength: 1 }),
// (code, message) => {
// const response = { code, message };
// expect(response.code).toBeGreaterThan(0);
// expect(typeof response.message).toBe("string");
// },
// ),
// );
// });
//
// it("分页响应 data 包含 items/total/page/pageSize", () => {
// fc.assert(
// fc.property(
// fc.array(fc.anything()),
// fc.nat(),
// fc.integer({ min: 1 }),
// fc.integer({ min: 1, max: 100 }),
// (items, total, page, pageSize) => {
// const response = { code: 0, data: { items, total, page, pageSize } };
// expect(response.data).toHaveProperty("items");
// expect(response.data).toHaveProperty("total");
// expect(response.data).toHaveProperty("page");
// expect(response.data).toHaveProperty("pageSize");
// },
// ),
// );
// });
// });