Review.js 513 Bytes
Newer Older
Kim, Chaerin's avatar
Kim, Chaerin committed
1
2
3
4
5
6
7
8
9
import mongoose from 'mongoose'

const { String } = mongoose.Schema.Types

const ReviewSchema = new mongoose.Schema({
    link: {
        type: String,
        required: true,
    },
10
    content: {
Kim, Chaerin's avatar
Kim, Chaerin committed
11
12
13
14
        type: String,
        required: true,
        unique: true,
    },
15
16
    keyword: {
        type: Array,
Kim, Chaerin's avatar
Kim, Chaerin committed
17
18
19
20
21
22
23
24
25
26
27
        required: true,
    },
    time: {
        type: Array,
        required: true,
    },
}, {
    timestamps: true
})

export default mongoose.models.Review || mongoose.model('Review', ReviewSchema)