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
/
photo_model.js
9 lines
•
260 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
var
mongoose =
require
(
'mongoose'
),
Schema
= mongoose.
Schema
;
var
PhotoSchema
=
new
Schema
({
title
:
String
,
filename
:
String
,
timestamp
: {
type
:
Date
,
default
:
Date
.
now
},
commentId
:
Schema
.
ObjectId
}); mongoose.
model
(
'Photo'
,
PhotoSchema
);