fileinfo.model.ts 374 Bytes
Newer Older
Lee Soobeom's avatar
Lee Soobeom committed
1
import { model, ObjectId, Schema } from "mongoose";
Kim, MinGyu's avatar
Kim, MinGyu committed
2

Lee Soobeom's avatar
Lee Soobeom committed
3
export interface IFileInfo {
Yoon, Daeki's avatar
Yoon, Daeki committed
4
5
6
  originalfilename: string;
  newfilename: string;
  picturepath: string;
Kim, MinGyu's avatar
Kim, MinGyu committed
7
8
}

Lee Soobeom's avatar
Lee Soobeom committed
9
const schema = new Schema<IFileInfo>({
Kim, MinGyu's avatar
Kim, MinGyu committed
10
11
12
13
14
  originalfilename: { type: String, unique: true },
  newfilename: { type: String },
  picturepath: { type: String },
});

Lee Soobeom's avatar
Lee Soobeom committed
15
export default model<IFileInfo>("FileInfo", schema);