import { Document, Schema, model } from 'mongoose'; export interface FileInterface extends Document { name: string, identifier: string, mimeType: string, data: Buffer, downloaded: number, maxDownloads: number, } const File: Schema = new Schema({ name: String, identifier: String, mimeType: String, data: Buffer, downloaded: Number, maxDownloads: Number, }); export default model('File', File);