From 86d68fd5e534d6813830b2421d80c9e0bd241208 Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Sat, 4 Oct 2025 22:13:13 +0800 Subject: [PATCH] =?UTF-8?q?feat(wip):=20=E7=BE=A4=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/data/ChatGroup.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 server/data/ChatGroup.ts diff --git a/server/data/ChatGroup.ts b/server/data/ChatGroup.ts new file mode 100644 index 0000000..e09260b --- /dev/null +++ b/server/data/ChatGroup.ts @@ -0,0 +1,13 @@ +import chalk from "chalk" +import Chat from "./Chat.ts" +import User from "./User.ts" + +export default class ChatGroup extends Chat { + static fromChat(chat: Chat) { + return new ChatGroup(chat.bean) + } + + static createGroup(chatId?: string) { + return this.create(chatId || crypto.randomUUID(), 'group') + } +} \ No newline at end of file