Skip to content

Commit 5b0068b

Browse files
committed
feat: 云文档获取列表与创建文档接口 以及初始化前端插件
1 parent 253f872 commit 5b0068b

File tree

13 files changed

+2273
-15
lines changed

13 files changed

+2273
-15
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"author": "moonrailgun",
44
"private": true,
55
"scripts": {
6-
"dev": "ts-node ./runner",
6+
"dev": "ts-node ./runner.ts",
77
"postinstall": "git submodule init && git submodule update"
88
},
99
"dependencies": {
10-
"tailchat-server-sdk": "^0.0.5"
10+
"tailchat-server-sdk": "^0.0.9"
1111
},
1212
"devDependencies": {
1313
"@types/node": "^17.0.21",
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const path = require('path');
2+
3+
module.exports = {
4+
externalDeps: ['react'],
5+
pluginRoot: path.resolve(__dirname, './web'),
6+
outDir: path.resolve(__dirname, '../../public'),
7+
};
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { db } from 'tailchat-server-sdk';
2+
const { getModelForClass, prop, modelOptions, TimeStamps } = db;
3+
4+
@modelOptions({
5+
options: {
6+
customName: 'p_docs',
7+
},
8+
})
9+
export class Doc extends TimeStamps implements db.Base {
10+
_id: db.Types.ObjectId;
11+
id: string;
12+
13+
/**
14+
* 创建者
15+
*/
16+
@prop({
17+
index: true,
18+
})
19+
creator: db.Types.ObjectId;
20+
}
21+
22+
export type DocDocument = db.DocumentType<Doc>;
23+
24+
const model = getModelForClass(Doc);
25+
26+
export type DocModel = typeof model;
27+
28+
export default model;

plugins/com.msgbyte.docs/package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
"author": "moonrailgun",
66
"license": "MIT",
77
"private": true,
8-
"scripts": {},
9-
"devDependencies": {},
10-
"dependencies": {}
8+
"scripts": {
9+
"build:web": "ministar buildPlugin all",
10+
"build:web:watch": "ministar watchPlugin all"
11+
},
12+
"dependencies": {
13+
"mini-star": "^1.3.1"
14+
}
1115
}

0 commit comments

Comments
 (0)