2018-10-09 10:42:28 +02:00
|
|
|
import {Observable} from 'rxjs';
|
|
|
|
|
2017-06-08 19:46:36 +02:00
|
|
|
export interface AppUser {
|
|
|
|
_id?: string;
|
|
|
|
username?: string;
|
2018-11-24 14:05:52 +01:00
|
|
|
squad?: any; // Squad or id-string
|
2017-06-08 19:46:36 +02:00
|
|
|
secret?: string;
|
2018-11-24 14:05:52 +01:00
|
|
|
activated?: boolean;
|
|
|
|
permission?: number;
|
2018-10-13 09:07:36 +02:00
|
|
|
token?: string;
|
2017-06-08 19:46:36 +02:00
|
|
|
}
|
|
|
|
|
2017-05-10 11:04:06 +02:00
|
|
|
export interface User {
|
|
|
|
_id?: string;
|
|
|
|
boardUserId?: number;
|
|
|
|
username?: string;
|
2018-03-07 11:56:50 +01:00
|
|
|
squadId?: any; // Squad or id-string
|
2017-10-14 15:26:05 +02:00
|
|
|
rankLvl?: number;
|
2017-05-10 11:04:06 +02:00
|
|
|
rank?: Rank;
|
|
|
|
awards?: Award[];
|
|
|
|
}
|
|
|
|
|
2017-07-08 21:56:11 +02:00
|
|
|
export interface Player {
|
|
|
|
_id?: string;
|
2017-12-27 20:42:30 +01:00
|
|
|
num?: string; // ranking number for high score
|
2017-07-08 21:56:11 +02:00
|
|
|
fraction?: string;
|
|
|
|
name?: string;
|
|
|
|
warId?: War;
|
|
|
|
kill?: number;
|
2018-04-14 17:46:01 +02:00
|
|
|
vehicleLight?: number;
|
|
|
|
vehicleHeavy?: number;
|
|
|
|
vehicleAir?: number;
|
2017-07-08 21:56:11 +02:00
|
|
|
death?: number;
|
|
|
|
friendlyFire?: number;
|
2017-08-05 23:19:23 +02:00
|
|
|
revive?: number;
|
2017-07-08 21:56:11 +02:00
|
|
|
respawn?: number;
|
|
|
|
flagTouch?: number;
|
2019-02-09 21:55:13 +01:00
|
|
|
performance?: string;
|
2019-02-10 18:22:47 +01:00
|
|
|
travelDistance?: number;
|
|
|
|
driverDistance?: number;
|
2017-07-08 21:56:11 +02:00
|
|
|
}
|
2017-09-03 12:49:59 +02:00
|
|
|
|
2017-10-01 20:24:35 +02:00
|
|
|
export interface CampaignPlayer {
|
|
|
|
name?: string;
|
|
|
|
campaign?: Campaign;
|
|
|
|
players?: Player[];
|
|
|
|
}
|
|
|
|
|
2017-08-12 21:37:31 +02:00
|
|
|
export interface Campaign {
|
|
|
|
_id?: string;
|
|
|
|
title?: string;
|
2018-10-09 10:42:28 +02:00
|
|
|
wars$?: Observable<War[]>;
|
2017-08-12 21:37:31 +02:00
|
|
|
}
|
2017-09-03 12:49:59 +02:00
|
|
|
|
2017-07-08 21:56:11 +02:00
|
|
|
export interface War {
|
|
|
|
_id?: string;
|
2017-07-08 22:50:01 +02:00
|
|
|
title?: string;
|
2017-07-14 23:33:17 +02:00
|
|
|
date?: string;
|
2017-10-30 08:59:08 +01:00
|
|
|
endDate?: string;
|
2017-07-08 21:56:11 +02:00
|
|
|
ptBlufor?: number;
|
|
|
|
ptOpfor?: number;
|
2017-07-30 16:25:11 +02:00
|
|
|
playersBlufor?: number;
|
|
|
|
playersOpfor?: number;
|
2017-10-28 22:50:54 +02:00
|
|
|
budgetBlufor?: number;
|
|
|
|
budgetOpfor?: number;
|
|
|
|
endBudgetBlufor?: number;
|
|
|
|
endBudgetOpfor?: number;
|
2017-08-12 23:13:39 +02:00
|
|
|
players?: Player[];
|
|
|
|
campaign?: string;
|
2017-07-08 21:56:11 +02:00
|
|
|
}
|
|
|
|
|
2017-05-10 11:04:06 +02:00
|
|
|
export interface Squad {
|
|
|
|
_id?: string;
|
|
|
|
name?: string;
|
|
|
|
fraction?: string;
|
|
|
|
sortingNumber?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Rank {
|
|
|
|
_id?: string;
|
|
|
|
name?: string;
|
|
|
|
fraction?: string;
|
|
|
|
level?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Award {
|
2018-03-07 11:56:50 +01:00
|
|
|
_id?: string;
|
|
|
|
userId: string;
|
|
|
|
decorationId?: any; // Decoration or string
|
2017-05-10 11:04:06 +02:00
|
|
|
reason?: string;
|
2017-06-09 18:30:35 +02:00
|
|
|
proposer?: AppUser;
|
2017-05-10 11:04:06 +02:00
|
|
|
date?: number; // since Date.now() returns a number
|
2017-06-10 22:07:32 +02:00
|
|
|
confirmed?: number;
|
2018-03-11 13:59:04 +01:00
|
|
|
rejectReason?: string;
|
2017-05-10 11:04:06 +02:00
|
|
|
}
|
|
|
|
|
2017-06-10 13:16:15 +02:00
|
|
|
export interface Promotion {
|
2017-06-11 13:18:03 +02:00
|
|
|
_id?: string;
|
2018-03-07 11:56:50 +01:00
|
|
|
userId?: string;
|
|
|
|
oldRankLvl: number;
|
|
|
|
newRankLvl: number;
|
2018-03-11 14:29:03 +01:00
|
|
|
rejectReason?: string;
|
2018-06-17 16:44:31 +02:00
|
|
|
confirmed?: number;
|
2017-06-10 13:16:15 +02:00
|
|
|
}
|
|
|
|
|
2017-05-10 11:04:06 +02:00
|
|
|
export interface Decoration {
|
|
|
|
_id?: string;
|
|
|
|
name?: string;
|
|
|
|
description?: string;
|
|
|
|
fraction?: string;
|
|
|
|
sortingNumber?: number;
|
|
|
|
isMedal?: boolean;
|
|
|
|
}
|
2017-05-11 21:46:28 +02:00
|
|
|
|
2018-04-02 13:20:44 +02:00
|
|
|
export interface ArmySquad {
|
|
|
|
_id?: string;
|
|
|
|
name?: string;
|
|
|
|
memberCount?: number;
|
|
|
|
members?: {
|
|
|
|
_id,
|
|
|
|
username,
|
|
|
|
rank
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-05-11 21:46:28 +02:00
|
|
|
export interface Army {
|
2018-04-02 13:20:44 +02:00
|
|
|
squads?: ArmySquad[];
|
|
|
|
memberCount?: number;
|
2017-05-11 21:46:28 +02:00
|
|
|
}
|
2017-05-10 11:04:06 +02:00
|
|
|
|