todoList model created.

This commit is contained in:
joewaa 2017-06-10 23:25:02 +08:00 committed by GitHub
parent 6f77950e3d
commit bfabd7da64

10
models/todoListModel.js Normal file
View file

@ -0,0 +1,10 @@
var monngoose = require('mongoose');
var Schema = mongoose.Schema;
var TaskSchema = new Schema({
name: { type: String, Required: 'Kindly enter the name of the task'},
Created_date: {type: Date, default: Date.now},
status: { type:['pending','ongoing','completed'],default:['pending']}
});
module.exports = mongoose.model('Task',TaskSchema);