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

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

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

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