aboutsummaryrefslogtreecommitdiff
path: root/models/todoItem.js
blob: f46e3f9600b4b3e524625d9a9aaf50fa7cac2a9b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
const mongoose = require('mongoose');

// mongdb entry schema
const todoItemSchema = new mongoose.Schema({
    _id: mongoose.Schema.Types.ObjectId,
    item: {
        type: String,
        required: true
    },
    date: String
});
// export schema
module.exports = mongoose.model('TodoItem', todoItemSchema);