'use strict';

var LibraryFactory = angular.module('libraries.factory', [
]).factory('LibraryFactory', [
    'Common',
    function(Common) {

        function Library(data) {
            var self = this;
            // merge data
            if (data) angular.extend(this, data);
            // extend members
            
            this.PublishedOn = new Date(this.PublishedOn);

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

        return {
            create: create
        };
    }
]);