import { model, Schema } from "mongoose"; export interface IFileInfo { originalfilename?: string; newfilename?: string; picturepath?: string; nickname?: string; } const schema = new Schema({ originalfilename: { type: String, unique: true }, newfilename: { type: String }, nickname: { type: String }, picturepath: { type: String }, }); export default model("FileInfo", schema);