Store in GIT
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
var Plane = (function () {
|
||||
function Plane(id, name, registration, model, comment) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.registration = registration;
|
||||
this.model = model;
|
||||
this.comment = comment;
|
||||
}
|
||||
Plane.prototype.equals = function (other) {
|
||||
if (other) {
|
||||
var keySet1 = Object.keys(this);
|
||||
var keySet2 = Object.keys(other);
|
||||
var j = 0;
|
||||
var isTheSame = true;
|
||||
for (j; j < keySet1.length; j++) {
|
||||
if (this[keySet1[j]] !== other[keySet2[j]]) {
|
||||
// Shit is not the same
|
||||
isTheSame = false;
|
||||
}
|
||||
}
|
||||
return isTheSame;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
Plane.toPlane = function (r) {
|
||||
var plane = new Plane(r.ID, r.NAME, r.REGISTRATION, r.MODEL, r.COMMENT);
|
||||
//console.log('Parsed plane:', plane);
|
||||
return plane;
|
||||
};
|
||||
return Plane;
|
||||
}());
|
||||
exports.Plane = Plane;
|
||||
//# sourceMappingURL=plane.class.js.map
|
||||
Reference in New Issue
Block a user