Skip to content

Commit 7abb519

Browse files
committed
created the data layer, hawwwt
1 parent 72f4fad commit 7abb519

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
var mongoose = require('mongoose')
2+
var mongoosePaginate = require('mongoose-paginate')
3+
4+
5+
var ToDoSchema = new mongoose.Schema({
6+
title: String,
7+
description: String,
8+
date: Date,
9+
status: String
10+
})
11+
12+
ToDoSchema.plugin(mongoosePaginate)
13+
const ToDo = mongoose.model('Todo', ToDoSchema)
14+
15+
module.exports = ToDo;

0 commit comments

Comments
 (0)