torsten@13: Ext.define('Lada.model.Probe', { torsten@13: extend: 'Ext.data.Model', torsten@21: fields: [ torsten@50: {name: "probeId"}, torsten@21: {name: "baId"}, torsten@21: {name: "datenbasisId"}, torsten@21: {name: "erzeugerId"}, torsten@21: {name: "hauptprobenNr"}, torsten@99: {name: "messmethode"}, torsten@99: {name: "nebenprobenNr"}, torsten@99: {name: "bezeichnung"}, torsten@99: {name: "kreis"}, torsten@21: {name: "letzteAenderung"}, torsten@21: {name: "media"}, torsten@21: {name: "mediaDesk"}, torsten@21: {name: "mittelungsdauer"}, torsten@21: {name: "mpKat"}, torsten@21: {name: "mplId"}, torsten@21: {name: "mprId"}, torsten@21: {name: "mstId"}, torsten@21: {name: "netzbetreiberId"}, torsten@21: {name: "probeNehmerId"}, torsten@77: {name: "probeentnahmeBeginn", type: 'date', convert: ts2date, defaultValue: new Date()}, torsten@77: {name: "probeentnahmeEnde", type: 'date', convert: ts2date, defaultValue: new Date()}, torsten@21: {name: "probenartId"}, torsten@77: {name: "solldatumBeginn", type: 'date', convert: ts2date, defaultValue: new Date()}, torsten@77: {name: "solldatumEnde", type: 'date', convert: ts2date, defaultValue: new Date()}, torsten@21: {name: "test"}, torsten@21: {name: "umwId"} torsten@50: ], torsten@65: idProperty: "probeId", torsten@50: proxy: { torsten@50: type: 'rest', torsten@50: appendId: true, //default torsten@50: url: 'server/rest/proben', torsten@50: api: { torsten@50: }, torsten@50: reader: { torsten@77: type: 'json', torsten@77: root: 'data' torsten@50: } torsten@50: } torsten@13: }); torsten@21: torsten@21: function ts2date(v, record){ torsten@21: // Converts a timestamp into a date object. torsten@21: return new Date(v); torsten@21: }