torsten@318: /** torsten@318: * Model class for Ort torsten@318: */ torsten@94: Ext.define('Lada.model.Ort', { torsten@94: extend: 'Ext.data.Model', torsten@303: requires: ['Lada.lib.Helpers'], torsten@94: fields: [ torsten@149: // Field from the l_ort table torsten@149: {name: "portId", type: 'int'}, torsten@149: {name: "ortId", type: 'int'}, torsten@149: {name: "probeId"}, torsten@149: {name: "ortsTyp"}, torsten@154: {name: "ortszusatztext"}, torsten@303: {name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()} torsten@94: ], torsten@149: idProperty: "portId", torsten@94: proxy: { torsten@94: type: 'rest', torsten@94: appendId: true, //default torsten@94: url: 'server/rest/ort', torsten@94: api: { torsten@94: }, torsten@94: reader: { torsten@94: type: 'json', torsten@94: root: 'data' torsten@94: } torsten@217: }, torsten@217: getEidi: function() { torsten@217: var ortId = this.get('portId'); torsten@217: var probeId = this.get('probeId'); torsten@217: return "/" + ortId + "/" + probeId; torsten@94: } torsten@94: });