torsten@94: Ext.define('Lada.model.Ort', { torsten@94: extend: 'Ext.data.Model', torsten@94: fields: [ torsten@94: {name: "ort"}, torsten@94: {name: "ortId", mapping:"ort.ortId", type: 'int'}, torsten@94: {name: "otyp", mapping:"ort.otyp"}, torsten@94: {name: "bezeichnung", mapping:"ort.bezeichnung"}, torsten@94: {name: "beschreibung", mapping:"ort.beschreibung"}, torsten@94: {name: "unscharf", mapping:"ort.unscharf"}, torsten@94: {name: "nutsCode", mapping:"ort.nutsCode"}, torsten@94: {name: "koordXExtern", mapping:"ort.koordXExtern"}, torsten@94: {name: "koordYExtern", mapping:"ort.koordYExtern"}, torsten@94: {name: "hoeheLand", mapping:"ort.hoeheLand", type: 'float'}, torsten@94: {name: "letzteAenderung", mapping:"ort.letzteAenderung", type: 'date', convert: ts2date, defaultValue: new Date()}, torsten@94: {name: "latitude", mapping:"ort.latitude", type: 'float'}, torsten@94: {name: "longitude", mapping:"ort.longitude", type: 'float'} torsten@94: ], torsten@94: idProperty: "ortId", torsten@94: proxy: { torsten@94: type: 'rest', torsten@94: appendId: true, //default torsten@94: url: 'server/rest/ort', torsten@94: api: { torsten@94: }, torsten@94: reader: { torsten@94: type: 'json', torsten@94: root: 'data' torsten@94: } torsten@94: } torsten@94: }); torsten@94: torsten@94: function ts2date(v, record){ torsten@94: // Converts a timestamp into a date object. torsten@94: return new Date(v); torsten@94: }