/*global require*/
// Identify require as a global function/keyword for JSHint

var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var ObjectId = Schema.ObjectId;
//var config = require('../../config.js');

this.assertionModel = {
		timestamp: {type: Date, "default": Date.now},
		alpha_report_id: ObjectId
};
var AssertionSchema = new Schema(this.assertionModel);
this.assertion = mongoose.model('Assertion', AssertionSchema);
@@ -244,18 +244,19 @@
  %7B%0A%09
-%09timestamp
+createdDate
 : %7Bt
@@ -268,176 +268,1174 @@
 Date
-, %22default%22: Date.now%7D,%0A%09%09alpha_report_id: ObjectId%0A%7D;%0Avar AssertionSchema = new Schema(this.assertionModel);%0Athis.assertion = mongoose.model('Assertion', AssertionSchema);
+%7D,%0A%09updatedDate: %7Btype: Date%7D,%09%0A%09alpha_report_id: %7Btype: String, required: true%7D,%0A%09reporter_id: %7Btype: String%7D,%0A%09entity1: %7Btype: String, required: true%7D,%0A%09relationship: %7Btype: String, required: true%7D,%0A%09entity2: %7Btype: String, required: true%7D%0A%7D;%0Avar AssertionSchema = new Schema(this.assertionModel);%0Athis.assertion = mongoose.model('Assertion', AssertionSchema);%0A%0Athis.assertionValidation= %7B%0A%09properties: %7B%0A%09%09createdDate: %7B%0A%09%09%09description: 'Date this assertion was created in datastore',%0A%09%09%09type: 'date'%0A%09%09%7D,%0A%09%09updatedDate: %7B%0A%09%09%09description: 'Date this assertion was last updated in datastore',%0A%09%09%09type: 'date'%0A%09%09%7D,%0A%09%09alpha_report_id: %7B%0A%09%09%09description: 'ID of the corresponding alpha report',%0A%09%09%09type: 'string',%0A%09%09%09required: true%0A%09%09%7D,%0A%09%09reporter_id: %7B%0A%09%09%09description: 'ID of the reporter who submitted the alpha report',%0A%09%09%09type: 'string',%0A%09%09%7D,%0A%09%09entity1: %7B%0A%09%09%09description: 'The subject of the raw feed',%0A%09%09%09type: 'string',%0A%09%09%09required: true%0A%09%09%7D,%0A%09%09relationship: %7B%0A%09%09%09description: 'The verb connecting the two entities',%0A%09%09%09type: 'string',%0A%09%09%09required: true%0A%09%09%7D,%0A%09%09entity2: %7B%0A%09%09%09description: 'The object of the raw feed',%0A%09%09%09type: 'string',%0A%09%09%09required: true%0A%09%09%7D%0A%09%7D%09%0A%7D;%0A

Define assertion model and validation