notice.js 526 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const mongoose = require('mongoose');

const { Schema } = mongoose;
const noticeSchema = new Schema({
    notice_img: {
        type: Array,
    },
    notice_title: {
        type: String,
        required: true,
    },
    notice_author: {
        type: String,
        required: true,
    },
    post_date: {
        type: Date,
        default: Date.now,
        required: true,
    },
    notice_content: {
        type: String,
        required: true,
    },
});

Kim, Subin's avatar
Kim, Subin committed
27
module.exports = mongoose.model('Notice', noticeSchema);