update basejump, zipline and nonprofit models

This commit is contained in:
Michael Q Larson
2015-03-23 08:33:59 -07:00
parent f2f8d93f9f
commit ac8487a4fc
5 changed files with 78 additions and 2 deletions

22
models/Basejump.js Normal file
View File

@ -0,0 +1,22 @@
var mongoose = require('mongoose');
var secrets = require('../config/secrets');
/**
*
* @type {exports.Schema}
*/
var basejumpSchema = new mongoose.Schema({
name: {
type: String,
unique: true
},
picture: String,
video: String,
gitHubLink: String,
demoLink: String,
details: Array
});
module.exports = mongoose.model('Basejump', basejumpSchema);

View File

@ -0,0 +1,12 @@
var mongoose = require('mongoose');
var secrets = require('../config/secrets');
var basejumpCompletionSchema = new mongoose.Schema({
dateCompleted: Number,
completedWith: ObjectId,
basejumpHash: ObjectId,
githubUrl: String,
demoUrl: String
});
module.exports = mongoose.model('BasejumpCompletion', basejumpCompletionSchema);

31
models/Nonprofit.js Normal file
View File

@ -0,0 +1,31 @@
var mongoose = require('mongoose');
var secrets = require('../config/secrets');
/**
*
* @type {exports.Schema}
*/
var nonprofitSchema = new mongoose.Schema({
name: String,
registeredNonprofit: true,
requestedDeliverables: Array,
existingUserbase: true,
acceptJavascript: true,
agreeToTerms: true,
whatDoesNonprofitDo: String,
websiteLink: String,
stakeholderName: String,
stakeholderEmail: String,
endUser: String,
approvedDeliverables: Array,
projectDescription: String,
logoUrl: String,
imageUrl: String,
interestedCampers: Array,
confirmedCampers: Array,
estimatedHours: String
});
module.exports = mongoose.model('Nonprofit', nonprofitSchema);

View File

@ -14,8 +14,7 @@ var ziplineSchema = new mongoose.Schema({
}, },
picture: String, picture: String,
video: String, video: String,
gitHubLink: String, codepenLink: String,
demoLink: String,
details: Array details: Array
}); });

View File

@ -0,0 +1,12 @@
var mongoose = require('mongoose');
var secrets = require('../config/secrets');
var ziplineCompletionSchema = new mongoose.Schema({
dateCompleted: Number,
completedWith: ObjectId,
basejumpHash: ObjectId,
githubUrl: String,
demoUrl: String
});
module.exports = mongoose.model('ziplineCompletion', ziplineCompletionSchema);