var Backbone = require('backbone');
var Globals = require('../globals');

var ItemInCart = Backbone.Model.extend({

	initialize: function() {
        $.ajaxPrefilter(
            function(options, originalOptions, jqXHR) {
                options.xhrFields = {
                    withCredentials: true
                }
            }
        );
    },

    url: Globals.ApiUrl + '/cart/item',
    defaults: { 
    	count: 0
    }
});

module.exports = ItemInCart;