community-relations/src/models/File.ts

22 lines
436 B
TypeScript
Raw Normal View History

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<FileInterface>('File', File);