'use strict';

var DocumentFactory = angular.module('documents.factory', [
]).factory('DocumentFactory', [
    'Common',
    function(Common) {

        function Document(data) {
            var self = this;
            if (data) angular.extend(this, data);
            this.PublishedOn = new Date(this.PublishedOn);

        }

        var create = function(data) {
            return new Document(data);
        };

        return {
            create: create
        };
    }
]);