feat(msg): announcements 公告模块 + sendBatch 批量优化 + 权限扩展 + nextstep 文档

This commit is contained in:
SpecialX
2026-07-14 15:57:41 +08:00
parent 7dd5c44406
commit fb23c5234e
28 changed files with 3644 additions and 7 deletions

View File

@@ -0,0 +1,12 @@
/**
* Vitest 全局 setup —— 在所有测试文件之前设置环境变量。
*
* env.ts 在模块加载时调用 loadEnv() 解析 process.env
* 需要 DATABASE_URL必填。此处设置测试用值避免模块加载报错。
*/
process.env.DATABASE_URL = "mysql://test:test@localhost:3306/msg_test";
process.env.NODE_ENV = "test";
process.env.LOG_LEVEL = "error";
process.env.KAFKA_BROKERS = "localhost:9092";
process.env.KAFKA_CLIENT_ID = "msg-service-test";
process.env.KAFKA_CONSUMER_GROUP_ID = "msg-service-test-group";