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,5 +1,5 @@
import { Schema, model, models } from 'mongoose';
import { Schema, model, models, Model as MongoModel } from 'mongoose';
import { ModelSchema as ModelType } from '@/types/mongoSchema';
const ModelSchema = new Schema({
userId: {
type: Schema.Types.ObjectId,
@@ -95,4 +95,4 @@ const ModelSchema = new Schema({
}
});
export const Model = models['model'] || model('model', ModelSchema);
export const Model: MongoModel<ModelType> = models['model'] || model('model', ModelSchema);