'use strict';

var BlogFactory = angular.module('blogs.factory', [])
.factory('BlogFactory', [
    'Common',
    function(Common) {

        function Blog(data) {
            
            var self = this;
            
            if (data) angular.extend(this, data);
            //this.PublishedOn = this.PublishedOn ? new Date(this.PublishedOn) : null;
            //this.ExpiresOn = this.ExpiresOn ? new Date(this.ExpiresOn) : null;
        }
        
        var create = function (data) {
            return new Blog(data);
        };

        return {
            create: create
        };
    }
])