up
This commit is contained in:
@@ -973,11 +973,35 @@ export namespace main {
|
||||
}
|
||||
}
|
||||
|
||||
export class POTAUnmatched {
|
||||
activator: string;
|
||||
date: string;
|
||||
band: string;
|
||||
reference: string;
|
||||
reason: string;
|
||||
qso_id: number;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new POTAUnmatched(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.activator = source["activator"];
|
||||
this.date = source["date"];
|
||||
this.band = source["band"];
|
||||
this.reference = source["reference"];
|
||||
this.reason = source["reason"];
|
||||
this.qso_id = source["qso_id"];
|
||||
}
|
||||
}
|
||||
export class POTASyncResult {
|
||||
fetched: number;
|
||||
updated: number;
|
||||
already_tagged: number;
|
||||
added: number;
|
||||
unmatched: number;
|
||||
unmatched_list: POTAUnmatched[];
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new POTASyncResult(source);
|
||||
@@ -988,7 +1012,48 @@ export namespace main {
|
||||
this.fetched = source["fetched"];
|
||||
this.updated = source["updated"];
|
||||
this.already_tagged = source["already_tagged"];
|
||||
this.added = source["added"];
|
||||
this.unmatched = source["unmatched"];
|
||||
this.unmatched_list = this.convertValues(source["unmatched_list"], POTAUnmatched);
|
||||
}
|
||||
|
||||
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
||||
if (!a) {
|
||||
return a;
|
||||
}
|
||||
if (a.slice && a.map) {
|
||||
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
||||
} else if ("object" === typeof a) {
|
||||
if (asMap) {
|
||||
for (const key of Object.keys(a)) {
|
||||
a[key] = new classs(a[key]);
|
||||
}
|
||||
return a;
|
||||
}
|
||||
return new classs(a);
|
||||
}
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
export class QSLBulkUpdate {
|
||||
sent_status: string;
|
||||
rcvd_status: string;
|
||||
sent_date: string;
|
||||
rcvd_date: string;
|
||||
via: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new QSLBulkUpdate(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.sent_status = source["sent_status"];
|
||||
this.rcvd_status = source["rcvd_status"];
|
||||
this.sent_date = source["sent_date"];
|
||||
this.rcvd_date = source["rcvd_date"];
|
||||
this.via = source["via"];
|
||||
}
|
||||
}
|
||||
export class QSLDefaults {
|
||||
|
||||
Reference in New Issue
Block a user