Transports.js 653 Bytes
Ext.define('MyMA.model.Transports', {
    extend: 'Ext.data.Model',
    fields: [{
            name: 'id',
            type: 'int'
        }, {
            name: 'domain',
            type: 'string'
        }, {
            name: 'rootdir',
            type: 'string'
        }, {
            name: 'transport',
            type: 'string'
        }],
    proxy: {
        type: 'rest',
        url: Ext.Ajax.getRestUrl('api', 'transport'),
        reader: {
            type: 'json',
            root: 'results',
            totalProperty: 'total'
        },
        writer: {
            type: 'json',
            allowSingle: true
        }
    }
});