Files
2026-06-17 16:11:25 +02:00

34 lines
1.1 KiB
JavaScript

"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