This commit is contained in:
张成
2025-11-24 13:23:42 +08:00
commit 5d7444cd65
156 changed files with 50653 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
/**
* Job 模块统一导出
* 聚合所有 job 相关模块的方法,提供统一的对外接口
*/
const jobManager = require('./jobManager');
const resumeManager = require('./resumeManager');
const chatManager = require('./chatManager');
const pack = (instance) => {
const proto = Object.getPrototypeOf(instance);
const methods = Object.getOwnPropertyNames(proto)
.filter(k => k !== 'constructor')
.reduce((acc, key) => {
acc[key] = proto[key].bind(instance);
return acc;
}, {});
return { ...instance, ...methods };
}
/**
* 便捷方法:直接导出常用方法
* 使用下划线命名规范
*/
module.exports = {
...pack(jobManager),
...pack(resumeManager),
...pack(chatManager),
};