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:  * Model class for Kommentare
raimund@548:  */
raimund@548: Ext.define('Lada.model.PKommentar', {
raimund@548:     extend: 'Ext.data.Model',
raimund@548: 
raimund@548:     fields: [{
raimund@548:         name: 'id'
raimund@548:     }, {
dustin@691:         name: 'owner',
dustin@691:         type: 'boolean'
dustin@691:     }, {
dustin@702:         name: 'readonly',
dustin@702:         type: 'boolean',
dustin@702:         persist: false
dustin@702:     }, {
raimund@548:         name: 'probeId'
raimund@548:     }, {
tom@1217:         name: 'mstId'
raimund@548:     }, {
raimund@548:         name: 'datum',
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);
dustin@970:         }
raimund@548:     }, {
raimund@548:         name: 'text'
raimund@548:     }],
raimund@548: 
raimund@548:     idProperty: 'id',
raimund@548: 
raimund@548:     proxy: {
raimund@548:         type: 'rest',
dustin@999:         url: 'lada-server/rest/pkommentar',
raimund@548:         reader: {
raimund@548:             type: 'json',
raimund@548:             root: 'data'
raimund@548:         }
raimund@548:     }
raimund@548: });