torsten@322: /** torsten@322: * Model class for Status torsten@322: */ torsten@170: Ext.define('Lada.model.Status', { torsten@170: extend: 'Ext.data.Model', torsten@308: requires: ['Lada.lib.Helpers'], torsten@170: fields: [ torsten@220: {name: "sid"}, torsten@170: {name: "messungsId"}, torsten@170: {name: "probeId"}, torsten@170: {name: "erzeuger"}, torsten@200: {name: "status", defaultValue: 1}, torsten@308: {name: "sdatum", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}, torsten@200: {name: "skommentar"} torsten@170: ], torsten@225: idProperty: "sid", torsten@170: proxy: { torsten@170: type: 'rest', torsten@170: appendId: true, //default torsten@170: url: 'server/rest/status', torsten@170: reader: { torsten@170: type: 'json', torsten@170: root: 'data' torsten@170: } torsten@170: }, torsten@170: getEidi: function() { torsten@220: var sid = this.get('sid'); torsten@170: var messId = this.get('messungsId'); torsten@170: var probeId = this.get('probeId'); torsten@170: return "/" + sid + "/" + messId + "/" + probeId; torsten@170: } torsten@170: });