Mercurial > lada > lada-client
view app/model/Probe.js @ 305:2af694c73dd7
Use ts2date function from lib.Helpers. Remove old code
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Fri, 09 Aug 2013 15:24:00 +0200 |
parents | 8475a625a773 |
children | 4c4f03c87d49 |
line wrap: on
line source
/** * A Probe. * This class represents and defines the model of a "Probe" * */ Ext.define('Lada.model.Probe', { extend: 'Ext.data.Model', requires: ['Lada.lib.Helpers'], fields: [ {name: "probeId"}, {name: "baId"}, {name: "datenbasisId"}, {name: "erzeugerId"}, {name: "hauptprobenNr"}, {name: "messmethode"}, {name: "nebenprobenNr"}, {name: "letzteAenderung", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}, {name: "media"}, {name: "mediaDesk"}, {name: "mittelungsdauer"}, {name: "mpKat"}, {name: "mplId"}, {name: "mprId"}, {name: "mstId"}, {name: "netzbetreiberId"}, {name: "probeNehmerId"}, {name: "probeentnahmeBeginn", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}, {name: "probeentnahmeEnde", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}, {name: "probenartId"}, {name: "solldatumBeginn", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}, {name: "solldatumEnde", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}, {name: "test"}, {name: "umwId"}, // Readonly-Flag (sent additionaly by the server, not part of the // model) {name: "readonly"} ], idProperty: "probeId", proxy: { type: 'rest', appendId: true, //default url: 'server/rest/proben', reader: { type: 'json', root: 'data' } } });