feat: add chat message

This commit is contained in:
2024-10-01 00:47:14 +08:00
parent e05c042827
commit bd38ad2eaa
20 changed files with 556 additions and 10 deletions

27
src/scripts/recover.ts Normal file
View File

@@ -0,0 +1,27 @@
import { ContainerModel } from '@/routes/container/models/index.ts';
const recoverData = async () => {
const data = {
id: '868970a4-8cab-4141-a73c-cc185fd17508',
title: '测试es6每次导入的变量运行一次+1并打印',
description: '',
tags: [],
type: '',
code: "let a = 1\n\nexport const main = () => {\n console.log('current a', a);\n return a++\n}",
source: '',
sourceType: '',
data: {
className: '',
style: {},
showChild: true,
shadowRoot: false,
},
publish: {},
uid: '14206305-8b5c-44cc-b177-766cfe2e452f',
createdAt: '2024-09-19T13:27:58.796Z',
updatedAt: '2024-09-28T05:27:05.381Z',
};
const r = await ContainerModel.create(data);
};
recoverData();