var CommentModel = Backbone.Model.extend({
	urlRoot : '/intranet/rest/documents/document/' + doc.doc_id + '/comments',
	defaults : {
		id : null,
		doc_id : null,
		body: null,
		user : {},
		created : {},
		version : null
	},

    url:function(){ // Append the parrent id to the url
        var url = this.urlRoot + (!this.isNew() ? ("/" + this.id) : "") + "?parent_id=" + doc.parent_id;
        return url;
    },

	allowedToEdit: function() {
		return true;
	}
	// validate : function (attrs) {
		// if(attrs.body.length)
			// return 'A comment is required';
	// }
});
