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