raimund@548: /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz raimund@548: * Software engineering by Intevation GmbH raimund@548: * raimund@548: * This file is Free Software under the GNU GPL (v>=3) raimund@548: * and comes with ABSOLUTELY NO WARRANTY! Check out raimund@548: * the documentation coming with IMIS-Labordaten-Application for details. raimund@548: */ raimund@548: raimund@548: /** raimund@548: * A Probe. raimund@548: * This class represents and defines the model of a 'Probe' raimund@548: **/ raimund@548: Ext.define('Lada.model.Probe', { raimund@548: extend: 'Ext.data.Model', raimund@548: raimund@548: fields: [{ raimund@548: name: 'id' raimund@548: }, { raimund@548: name: 'probeIdAlt' raimund@548: }, { raimund@548: name: 'hauptprobenNr' raimund@548: }, { raimund@548: name: 'test' raimund@548: }, { raimund@677: name: 'netzbetreiberId', raimund@677: serialize: function(value) { raimund@677: if (value === '') { raimund@677: return null; raimund@677: } raimund@677: return value; raimund@677: } raimund@548: }, { raimund@548: name: 'mstId' raimund@548: }, { raimund@548: name: 'datenbasisId' raimund@548: }, { raimund@548: name: 'baId' raimund@548: }, { raimund@548: name: 'probenartId' raimund@548: }, { raimund@548: name: 'mediaDesk' raimund@548: }, { raimund@548: name: 'media' raimund@548: }, { raimund@677: name: 'umwId', raimund@677: serialize: function(value) { raimund@677: if (value === '') { raimund@677: return null; raimund@677: } raimund@677: return value; raimund@677: } raimund@548: }, { raimund@548: name: 'probeentnahmeBeginn', raimund@548: type: 'date', raimund@548: convert: function(v) { raimund@548: if (!v) { raimund@548: return v; raimund@548: } raimund@548: return new Date(v); raimund@548: }, raimund@548: defaultValue: new Date() raimund@548: }, { raimund@548: name: 'probeentnahmeEnde', raimund@548: type: 'date', raimund@548: convert: function(v) { raimund@548: if (!v) { raimund@548: return v; raimund@548: } raimund@548: return new Date(v); raimund@548: }, raimund@548: defaultValue: new Date() raimund@548: }, { raimund@548: name: 'mittelungsdauer' raimund@548: }, { raimund@548: name: 'letzteAenderung', raimund@548: type: 'date', raimund@548: convert: function(v) { raimund@548: if (!v) { raimund@548: return v; raimund@548: } raimund@548: return new Date(v); raimund@548: }, raimund@548: defaultValue: new Date() raimund@548: }, { raimund@548: name: 'erzeugerId' raimund@548: }, { raimund@548: name: 'probeNehmerId' raimund@548: }, { raimund@548: name: 'mpKat' raimund@548: }, { raimund@548: name: 'mplId' raimund@548: }, { raimund@548: name: 'mprId' raimund@548: }, { raimund@548: name: 'solldatumBeginn', raimund@548: type: 'date', raimund@548: convert: function(v) { raimund@548: if (!v) { raimund@548: return v; raimund@548: } raimund@548: return new Date(v); raimund@548: }, raimund@548: defaultValue: new Date() raimund@548: }, { raimund@548: name: 'solldatumEnde', raimund@548: type: 'date', raimund@548: convert: function(v) { raimund@548: if (!v) { raimund@548: return v; raimund@548: } raimund@548: return new Date(v); raimund@548: }, raimund@548: defaultValue: new Date() raimund@548: }, { raimund@548: name: 'readonly', raimund@548: type: 'bool', raimund@548: persist: false raimund@689: }, { raimund@689: name: 'treeModified' raimund@548: }], raimund@548: raimund@548: idProperty: 'id', raimund@548: raimund@548: proxy: { raimund@548: type: 'rest', raimund@548: url: 'lada-server/probe', raimund@548: reader: { raimund@548: type: 'json', raimund@548: root: 'data' raimund@548: } raimund@548: } raimund@548: });