comparison app/model/Messprogramm.js @ 745:df684c3d4a7c

Added Messprogramme Store and Model
author Dustin Demuth <dustin@intevation.de>
date Fri, 24 Apr 2015 11:03:18 +0200
parents
children 78e73be45aaa
comparison
equal deleted inserted replaced
744:4381a32d874f 745:df684c3d4a7c
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
2 * Software engineering by Intevation GmbH
3 *
4 * This file is Free Software under the GNU GPL (v>=3)
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
6 * the documentation coming with IMIS-Labordaten-Application for details.
7 */
8
9 /**
10 * A Messprogramm.
11 * This class represents and defines the model of a 'Messprogramm'
12 **/
13 Ext.define('Lada.model.Messprogramm', {
14 extend: 'Ext.data.Model',
15
16 fields: [{
17 name: 'id'
18 }, {
19 name: 'test'
20 type: 'boolean'
21 }, {
22 name: 'netzbetreiberId',
23 serialize: function(value) {
24 if (value === '') {
25 return null;
26 }
27 return value;
28 }
29 }, {
30 name: 'mstId'
31 }, {
32 name: 'datenbasisId'
33 }, {
34 name: 'baId'
35 }, {
36 name: 'gemId'
37 }, {
38 name: 'ortId'
39 }, {
40 name: 'mediaDesk'
41 }, {
42 name: 'umwId',
43 serialize: function(value) {
44 if (value === '') {
45 return null;
46 }
47 return value;
48 }
49 }, {
50 name: 'probenartId'
51 }, {
52 name: 'probenintervall'
53 }, {
54 name: 'teilintervallVon'
55 }, {
56 name: 'teilintervallBis'
57 }, {
58 name: 'intervallOffset'
59 }, {
60 name: 'gueltigVon'
61 }, {
62 name: 'gueltigBis'
63 }, {
64 name: 'probeNehmerId'
65 }, {
66 name: 'probeKommentar'
67 }, {
68 name: 'letzteAenderung',
69 type: 'date',
70 convert: function(v) {
71 if (!v) {
72 return v;
73 }
74 return new Date(v);
75 },
76 defaultValue: new Date()
77 }],
78
79 idProperty: 'id',
80
81 proxy: {
82 type: 'rest',
83 //url: 'lada-server/messprogramm', //not yet implemented
84 reader: {
85 type: 'json',
86 root: 'data'
87 }
88 }
89 }

http://lada.wald.intevation.org