fileinfo.model.ts 422 Bytes
Newer Older
Kim, MinGyu's avatar
Kim, MinGyu committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { model, Schema } from "mongoose";

export interface IAvatar {
  originalfilename?: string;
  newfilename?: string;
  picturepath?: string;
  nickname?: string;
}

const Avatarschema = new Schema<IAvatar>({
  originalfilename: { type: String, unique: true },
  newfilename: { type: String },
  nickname: { type: String },
  picturepath: { type: String },
});

export default model<IAvatar>("Avatar", Avatarschema);