egg_server/utils/Card/index.ts
zhaoyingbo b44f66f6be
All checks were successful
Egg Server CI/CD / build-image (push) Successful in 1m9s
Egg Server CI/CD / refresh-image (push) Successful in 14s
Egg Server CI/CD / fast-deploy (push) Successful in 5s
feat(mi-chat): 优化消息返回功能
2024-10-11 10:59:32 +00:00

33 lines
695 B
TypeScript

class LarkCard {
private requestId: string
private xName: string
private xAuthor: string
private functionMap = {
egg: {
name: "小煎蛋",
author: "zhaoyingbo",
},
groupAgent: {
name: "Group Agent",
author: "AI创新应用组",
},
sheetDB: {
name: "小煎蛋 Sheet DB",
author: "zhaoyingbo",
},
}
constructor(func: keyof typeof this.functionMap, requestId: string) {
this.requestId = requestId
this.xName = this.functionMap[func].name
this.xAuthor = this.functionMap[func].author
}
child(func: keyof typeof this.functionMap) {
return new LarkCard(func, this.requestId)
}
}
export default LarkCard