-
-
Save StanShumsky/9ce5fb5e1a488385469ec3255eb20699 to your computer and use it in GitHub Desktop.
Mongoose Schemas for Resume
This file contains hidden or 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
var mongoose = require('mongoose'), | |
Schema = mongoose.Schema; | |
var PositionSchema = new Schema({ | |
company : String, | |
position : String, | |
summary : String, | |
startDate : Date | |
}); | |
module.exports = mongoose.model('position', PositionSchema); |
This file contains hidden or 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
var mongoose = require('mongoose'), | |
position = require('./position'), | |
Schema = mongoose.Schema; | |
var ResumeSchema = new Schema({ | |
name : String, | |
email : String, | |
phone : String, | |
positions : [{ type: Schema.ObjectId, ref : 'position'}] | |
}); | |
module.exports = mongoose.model('resume', ResumeSchema); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment