Store in GIT
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
"use strict";
|
||||
var user_class_1 = require("./user.class");
|
||||
var plane_class_1 = require("./plane.class");
|
||||
var Flight = (function () {
|
||||
function Flight(id, flightday_id, starttime, endtime, type, comment, plane, users) {
|
||||
this.id = id;
|
||||
this.flightday_id = flightday_id;
|
||||
this.plane = plane;
|
||||
this.starttime = starttime;
|
||||
this.endtime = endtime;
|
||||
this.type = type;
|
||||
this.comment = comment;
|
||||
this.users = users;
|
||||
}
|
||||
Flight.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;
|
||||
};
|
||||
Flight.toFlight = function (r) {
|
||||
var users = new Array();
|
||||
var plane = plane_class_1.Plane.toPlane(r.PLANE);
|
||||
for (var i = 0; i < r.USERS.length; i++) {
|
||||
users.push(user_class_1.User.toUser(r.USERS[i]));
|
||||
}
|
||||
var flight = new Flight(r.ID, r.FLIGHTDAY_ID, r.DATETIME_START, r.DATETIME_END, r.TYPE, r.COMMENT, plane, users);
|
||||
return flight;
|
||||
};
|
||||
return Flight;
|
||||
}());
|
||||
exports.Flight = Flight;
|
||||
//# sourceMappingURL=flight.class.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"flight.class.js","sourceRoot":"","sources":["flight.class.ts"],"names":[],"mappings":";AAAA,2CAAoC;AACpC,6CAAsC;AAEtC;IAWC,gBAAY,EAAS,EACpB,YAAmB,EACnB,SAAgB,EAChB,OAAc,EACd,IAAW,EACX,OAAc,EACd,KAAW,EACX,KAAiB;QAEjB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,YA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,EACtC,CAAC;YACA,KAAK,CAAC,IAAI,CAAC,iBAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrC,CAAC;QAED,IAAI,MAAM,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAEjH,MAAM,CAAC,MAAM,CAAC;IACjB,CAAC;IACF,aAAC;AAAD,CAAC,AArED,IAqEC;AArEY,wBAAM"}
|
||||
@@ -0,0 +1,73 @@
|
||||
import { User } from './user.class';
|
||||
import { Plane } from './plane.class';
|
||||
|
||||
export class Flight {
|
||||
id:number;
|
||||
flightday_id:number;
|
||||
starttime:string;
|
||||
endtime:string;
|
||||
type:string;
|
||||
comment:string;
|
||||
|
||||
plane:Plane
|
||||
users:Array<User>;
|
||||
|
||||
constructor(id:number,
|
||||
flightday_id:number,
|
||||
starttime:string,
|
||||
endtime:string,
|
||||
type:string,
|
||||
comment:string,
|
||||
plane:Plane,
|
||||
users:Array<User>)
|
||||
{
|
||||
this.id = id;
|
||||
this.flightday_id = flightday_id;
|
||||
this.plane = plane;
|
||||
this.starttime = starttime;
|
||||
this.endtime = endtime;
|
||||
this.type = type;
|
||||
this.comment = comment;
|
||||
this.users = users;
|
||||
}
|
||||
|
||||
|
||||
public equals(other:Flight) : boolean
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
public static toFlight(r:any): Flight
|
||||
{
|
||||
let users:Array<User> = new Array<User>();
|
||||
|
||||
let plane:Plane = Plane.toPlane(r.PLANE);
|
||||
|
||||
for(let i = 0; i < r.USERS.length; i++)
|
||||
{
|
||||
users.push(User.toUser(r.USERS[i]));
|
||||
}
|
||||
|
||||
let flight = new Flight(r.ID, r.FLIGHTDAY_ID, r.DATETIME_START, r.DATETIME_END, r.TYPE, r.COMMENT, plane, users);
|
||||
|
||||
return flight;
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"plane.class.js","sourceRoot":"","sources":["plane.class.ts"],"names":[],"mappings":";AAAA;IAQE,eAAY,EAAU,EACV,IAAY,EACZ,YAAmB,EACnB,KAAY,EACZ,OAAc;QAEzB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACZ,IAAI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||||
model:string;
|
||||
comment:string;
|
||||
|
||||
constructor(id: number,
|
||||
name: string,
|
||||
registration:string,
|
||||
model:string,
|
||||
comment:string) {
|
||||
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.registration = registration;
|
||||
this.model = model;
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public equals(other:Plane): boolean
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
public static toPlane(r:any): Plane{
|
||||
|
||||
let plane = new Plane(r.ID, r.NAME, r.REGISTRATION, r.MODEL, r.COMMENT);
|
||||
|
||||
//console.log('Parsed plane:', plane);
|
||||
return plane;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
var plane_class_1 = require("./plane.class");
|
||||
var Reader = (function () {
|
||||
function Reader(id, reader_id, plane) {
|
||||
this.id = id;
|
||||
this.reader_id = reader_id;
|
||||
this.plane = plane;
|
||||
}
|
||||
Reader.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;
|
||||
};
|
||||
Reader.toReader = function (r) {
|
||||
var plane = null;
|
||||
if (r.PLANE != null)
|
||||
plane = plane_class_1.Plane.toPlane(r.PLANE);
|
||||
var reader = new Reader(r.ID, r.READER_ID, plane);
|
||||
//console.log('Parsed reader:', reader);
|
||||
return reader;
|
||||
};
|
||||
return Reader;
|
||||
}());
|
||||
exports.Reader = Reader;
|
||||
//# sourceMappingURL=reader.class.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"reader.class.js","sourceRoot":"","sources":["reader.class.ts"],"names":[],"mappings":";AAAA,6CAAsC;AAEtC;IAME,gBAAY,EAAU,EACV,SAAiB,EACjB,KAAW;QAEtB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC1B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAEM,uBAAM,GAAb,UAAc,KAAY;QAExB,EAAE,CAAA,CAAC,KAAK,CAAC,CACP,CAAC;YACC,IAAI,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAChC,IAAI,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAEjC,IAAI,CAAC,GAAG,CAAC,CAAC;YACV,IAAI,SAAS,GAAG,IAAI,CAAC;YAErB,GAAG,CAAA,CAAC,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC/B,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC3C,uBAAuB;oBACvB,SAAS,GAAG,KAAK,CAAC;gBACpB,CAAC;YACH,CAAC;YAED,MAAM,CAAC,SAAS,CAAC;QACrB,CAAC;QAED,MAAM,CAAC,KAAK,CAAC;IACf,CAAC;IAEa,eAAQ,GAAtB,UAAuB,CAAK;QAE1B,IAAI,KAAK,GAAS,IAAI,CAAC;QAEvB,EAAE,CAAA,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC;YACjB,KAAK,GAAG,mBAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAEjC,IAAI,MAAM,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;QAEjD,wCAAwC;QACxC,MAAM,CAAC,MAAM,CAAC;IAChB,CAAC;IACH,aAAC;AAAD,CAAC,AAlDD,IAkDC;AAlDY,wBAAM"}
|
||||
@@ -0,0 +1,53 @@
|
||||
import { Plane } from './plane.class';
|
||||
|
||||
export class Reader {
|
||||
|
||||
id:number;
|
||||
reader_id:string;
|
||||
plane:Plane;
|
||||
|
||||
constructor(id: number,
|
||||
reader_id: string,
|
||||
plane:Plane) {
|
||||
|
||||
this.id = id;
|
||||
this.reader_id = reader_id;
|
||||
this.plane = plane;
|
||||
}
|
||||
|
||||
public equals(other:Reader): boolean
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
public static toReader(r:any): Reader{
|
||||
|
||||
let plane:Plane = null;
|
||||
|
||||
if(r.PLANE != null)
|
||||
plane = Plane.toPlane(r.PLANE);
|
||||
|
||||
let reader = new Reader(r.ID, r.READER_ID, plane)
|
||||
|
||||
//console.log('Parsed reader:', reader);
|
||||
return reader;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
var User = (function () {
|
||||
function User(id, name, cardId, role) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.card = cardId;
|
||||
this.role = role;
|
||||
}
|
||||
User.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;
|
||||
};
|
||||
User.toUser = function (r) {
|
||||
var user = new User(r.ID, r.NAME, r.CARD_ID, r.ROLE);
|
||||
//console.log('Parsed user:', user);
|
||||
return user;
|
||||
};
|
||||
return User;
|
||||
}());
|
||||
exports.User = User;
|
||||
//# sourceMappingURL=user.class.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"user.class.js","sourceRoot":"","sources":["user.class.ts"],"names":[],"mappings":";AAAA;IAOE,cAAY,EAAU,EACV,IAAY,EACZ,MAAc,EACd,IAAY;QAEvB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAClB,CAAC;IAEM,qBAAM,GAAb,UAAc,KAAU;QAEtB,EAAE,CAAA,CAAC,KAAK,CAAC,CACP,CAAC;YACC,IAAI,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAChC,IAAI,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAEjC,IAAI,CAAC,GAAG,CAAC,CAAC;YACV,IAAI,SAAS,GAAG,IAAI,CAAC;YAErB,GAAG,CAAA,CAAC,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC/B,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC3C,uBAAuB;oBACvB,SAAS,GAAG,KAAK,CAAC;gBACpB,CAAC;YACH,CAAC;YAED,MAAM,CAAC,SAAS,CAAC;QACrB,CAAC;QAED,MAAM,CAAC,KAAK,CAAC;IACf,CAAC;IAEa,WAAM,GAApB,UAAqB,CAAK;QAE1B,IAAI,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAA;QAEpD,oCAAoC;QACpC,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IACD,WAAC;AAAD,CAAC,AAhDD,IAgDC;AAhDY,oBAAI"}
|
||||
@@ -0,0 +1,49 @@
|
||||
export class User {
|
||||
|
||||
id:number;
|
||||
name:string;
|
||||
card:string;
|
||||
role:string;
|
||||
|
||||
constructor(id: number,
|
||||
name: string,
|
||||
cardId: string,
|
||||
role: string) {
|
||||
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.card = cardId;
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
public equals(other:User): boolean
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
public static toUser(r:any): User{
|
||||
|
||||
let user = new User(r.ID, r.NAME, r.CARD_ID, r.ROLE)
|
||||
|
||||
//console.log('Parsed user:', user);
|
||||
return user;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user