fileinfo.model.ts 414 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 {
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);