todoList model created.
This commit is contained in:
parent
6f77950e3d
commit
bfabd7da64
1 changed files with 10 additions and 0 deletions
10
models/todoListModel.js
Normal file
10
models/todoListModel.js
Normal 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);
|
Loading…
Add table
Add a link
Reference in a new issue