profile.js 308 Bytes
Newer Older
JeongYeonwoo's avatar
JeongYeonwoo committed
1
2
import mongoose from 'mongoose'

JeongYeonwoo's avatar
0113    
JeongYeonwoo committed
3
const { String } = mongoose.Schema.Types
JeongYeonwoo's avatar
JeongYeonwoo committed
4

JeongYeonwoo's avatar
0113    
JeongYeonwoo committed
5
const ProfileSchema = new mongoose.Schema({
JeongYeonwoo's avatar
JeongYeonwoo committed
6
    defaultImg: {
JeongYeonwoo's avatar
0113    
JeongYeonwoo committed
7
        type: String,
JeongYeonwoo's avatar
JeongYeonwoo committed
8
9
10
11
12
13
        required: true,
    },
}, {
    timestamps: true
})

JeongYeonwoo's avatar
0113    
JeongYeonwoo committed
14
export default mongoose.models.ProfileSchema || mongoose.model('profile', ProfileSchema)