Last active — forked from jdsiddon/gist:7441841

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
sudowork revised this gist . 1 changed file with 1 addition and 1 deletion. View gist @ fdcf5cc
gistfile1.txt
2 
@@ -10,7 +10,7 @@ var siteSchema = new Schema({
client: String,
siteUrl: String,
siteMaintenanceRequirements: String,
- siteLastMaintenance: [update],
+ siteLastMaintenance: [update.schema],
siteContractActive: Boolean
});
jdsiddon revised this gist . 1 changed file with 20 additions and 0 deletions. View gist @ 3c00834
gistfile1.txt
20 
@@ -1,3 +1,23 @@
+/* sites.js */
+var
+ mongoose = require('mongoose')
+ , Schema = mongoose.Schema
+ , update = require('./updates')
+;
+
+//Define the site model
+var siteSchema = new Schema({
+ client: String,
+ siteUrl: String,
+ siteMaintenanceRequirements: String,
+ siteLastMaintenance: [update],
+ siteContractActive: Boolean
+});
+
+module.exports = mongoose.model('site', siteSchema);
+
+
+/* updates.js */
var
mongoose = require('mongoose')
, Schema = mongoose.Schema
jdsiddon created this gist . View gist @ 37dc410
gistfile1.txt
14 
@@ -0,0 +1,14 @@
+var
+ mongoose = require('mongoose')
+ , Schema = mongoose.Schema
+ , ObjectId = Schema.ObjectId
+;
+
+//Define the site model
+var updateSchema = new Schema({
+ maintenanceDescription: String,
+ person: String,
+ date: Date
+});
+
+module.exports = mongoose.model('update', updateSchema);
\ No newline at end of file
Something went wrong with that request. Please try again.