notice.js 558 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
27
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,
        // default: "나야나"
        required: true,
    },
    post_date: {
        type: Date,
        default: Date.now,
        required: true,
    },
    notice_content: {
        type: String,
        required: true,
    },
});

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