8 lines
226 B
TypeScript
8 lines
226 B
TypeScript
|
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);
|