Load dependencies and create model

Code:
(function(){
    Ext.Loader.setConfig({
        enabled:true
    });
    
    Ext.Loader.setPath('App', '/assets/app');

    Ext.syncRequire([
        'App.model.EquipmentType',        
        'App.store.EquipmentTypes'
        ]);


    
    var eqStore = Ext.create('App.store.EquipmentTypes');
        
    eqStore.on('load', function(store, records) {
        var fields= [
        'id',
        'plan_type', 
        "equipment_requested",
        "equipment_approved",
        'network_id',
        'network_name'
        ];

        Ext.each(records, function(eqType) {
            var eqId = eqType.get('id');
                
            fields.push({
                name: 'equipment_requested_' + eqId,
                mapping: 'equipment_requested[' + eqId + ']',
                defaultValue: 0
            });
                
            fields.push({
                name: 'equipment_approved_' + eqId,
                mapping: 'equipment_approved[' + eqId + ']',
                defaultValue: 0
            });
        });

        Ext.define('App.model.Planning', {
            extend:'Ext.data.Model',

            fields: fields,


            proxy:{
                url:'/planning.json',

                type:'rest',
                simpleSortMode:true,
                reader:{
                    type:'json',
                    root:'items'
                },
                writer:{
                    type:'json',
                    root:"items",
                    encode:true,
                    writeAllFields:false
                }
            }

        });    

    });
        
    eqStore.load();
    
    
    
})();