Ext.define('User', {
extend: 'Ext.data.Model',
fields: [
{name: 'id', type: 'string'},
{name: 'roleName', type: 'string'},
{name: 'createDate'},
{name: 'state'}
],
proxy: {
type: 'ajax',
api: {
create : 'proxyApiController.do?method=create',
read : 'proxyApiController.do?method=create',
update : 'proxyApiController.do?method=update',
destroy : 'proxyApiController.do?method=create'
},
writer: {
type: "json",
encode: true,
allowSingle: false,
root: "data"
}
}
});