-
-
Save anonymous/ff8b66af904fb8e53d7b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** | |
* Module dependencies. | |
*/ | |
var mongoose = require('mongoose'), | |
Schema = mongoose.Schema; | |
/** | |
* Message Schema | |
*/ | |
var MessageSchema = new Schema({ | |
body: { | |
type: String, | |
default: '', | |
trim: true | |
}, | |
location: { | |
lat: { | |
type: Number | |
}, | |
long: { | |
type: Number | |
} | |
}, | |
created: { | |
type: Date, | |
default: Date.now | |
}, | |
user: { | |
type: Schema.ObjectId, | |
ref: 'User' | |
} | |
}); | |
mongoose.model('Message', MessageSchema); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment