UNPKG
fruitstand
Version:
latest (0.0.1)
0.0.1
fruit stand
github.com/classmember/fruitstand
classmember/fruitstand
fruitstand
/
examples
/
nodejs-mongodb-angularjs-web-development
/
ch27
/
models
/
page_model.js
7 lines
•
206 B
JavaScript
View Raw
1
2
3
4
5
6
7
var
mongoose =
require
(
'mongoose'
),
Schema
= mongoose.
Schema
;
var
PageSchema
=
new
Schema
({
name
: {
type
:
String
,
unique
:
true
},
commentId
:
Schema
.
ObjectId
}); mongoose.
model
(
'Page'
,
PageSchema
);