define([ "./_Class", "./surveys", "dojo/_base/declare" ], function(_Class, surveys, declare) { var SurveyRuns = declare([_Class],{ _collection: 'surveyRuns', _type: 'SurveyRun', create: function() { var obj = { type: this._type, description: "", mode: "open", survey: null, title: "" }; return obj; }, _deserialize: function(obj) { if (obj.endDate) { obj.endDate = this._parseDate(obj.endDate); } if (obj.startDate) { obj.startDate = this._parseDate(obj.startDate); } if (obj.survey) { obj.survey = surveys._doDeserialize(obj.survey); } }, _serialize: function(obj) { if (obj.endDate) { obj.endDate = this._formatDate(obj.endDate); } if (obj.startDate) { obj.startDate = this._formatDate(obj.startDate); } if (obj.survey) { obj.survey = surveys._doSerialize(obj.survey); } } }); return new SurveyRuns(); });