Archived
2

model routes

This commit is contained in:
VLE2FE
2020-08-13 12:07:40 +02:00
parent d363064dba
commit 08a9a12372
8 changed files with 273 additions and 11 deletions

8
src/models/model.ts Normal file
View File

@ -0,0 +1,8 @@
import mongoose from 'mongoose';
const ModelSchema = new mongoose.Schema({
name: {type: String, index: {unique: true}},
data: Buffer
});
export default mongoose.model<any, mongoose.Model<any, any>>('model', ModelSchema);