Ext.define('App.store.DocumentRefStore', {
	extend: 'Ext.data.Store',

	constructor: function(cfg) {
		var me = this;
		cfg = cfg || {};
		me.callParent([Ext.apply({
			proxy: {
				type: 'ajax',
				url: App.url('/document-ref/list.json'),
				extraParams: cfg.extraParams || {},
				reader: {
					type: 'json',
					rootProperty: 'records',
					idProperty: 'id'
				}
			},
			fields: [
				{
					name: 'id',
					type: 'int',
					allowNull: true
				},
				{
					name: 'documentId',
					type: 'int'
				},
				{
					name: 'refType',
					type: 'string'
				},
				{
					name: 'refId',
					type: 'int'
				},
				{
					name: 'refCode',
					type: 'string'
				}
			]
		}, cfg)]);
	}
});
