feat: 数据集管理

This commit is contained in:
archer
2023-03-25 22:13:15 +08:00
parent 0cee404c7f
commit 02cee35a45
20 changed files with 285 additions and 86 deletions

View File

@@ -1,4 +1,5 @@
import { Schema, model, models } from 'mongoose';
import type { DataItemSchema as DataItemType } from '@/types/mongoSchema';
import { Schema, model, models, Model } from 'mongoose';
const DataItemSchema = new Schema({
userId: {
@@ -45,4 +46,5 @@ const DataItemSchema = new Schema({
}
});
export const DataItem = models['dataItem'] || model('dataItem', DataItemSchema);
export const DataItem: Model<DataItemType> =
models['dataItem'] || model('dataItem', DataItemSchema);