/**
 * @author schiesser
 */
Ext.ns('efiport.book.model');

efiport.book.model = function(widget){
    var that = {};

/*	that.userEmail = function(){
		return Ext.state.Manager.get('user-email');
	}; */

	that.paymentType = 'invoice';
	
   that.authPartner = new Ext.data.Store({
   		url: '/axis2/services/PartnerService/getPartner',
        reader: new Ext.data.XmlReader({
            record: 'return'
        }, ['addressCity', 'addressStreet', 'addressZipCode',
		'email','firstName','lastName', 'accountNumber', 'nameOfBank', 'bankCode', 
			{name: 'directDebit', type: 'boolean'}])
    });	
	
   that.itemToBook = new Ext.data.Store({
   		url: '/axis2/services/EventService/getEvent',
        reader: new Ext.data.XmlReader({
            record: 'return',
            id: 'goid'
        }, [{
            name: 'title',
            mapping: 'title:last'
        }, {
            name: 'description',
            mapping: 'description:last'
        }, {
            name: 'imageURL',
            mapping: 'imageURL:last'
        }, {
            name: 'destinationURL',
            mapping: 'destinationURL:last'
        }, {
            name: 'actDate',
            mapping: 'actDate:last'
        }, {
            name: 'duration',
            mapping: 'duration:last'
        }, {
            name: 'price',
            mapping: 'price:last',
			type: 'float'
        }, {
            name: 'parentTitle',
            mapping: 'parent title'
        }, {
            name: 'parentPrice',
            mapping: 'parent price',
			type: 'float'
        }])
    });	

    return that;
};

