2017-06-08 19:46:36 +02:00
|
|
|
export interface AppUser {
|
|
|
|
_id?: string;
|
|
|
|
username?: string;
|
|
|
|
squad?: Squad;
|
|
|
|
secret?: string;
|
|
|
|
activated: boolean;
|
|
|
|
permission: number;
|
|
|
|
}
|
|
|
|
|
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-03-03 12:57:31 +01:00
|
|
|
vehicle?: 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;
|
|
|
|
}
|
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;
|
|
|
|
wars?: War[];
|
|
|
|
}
|
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;
|
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
|
|
|
|
|
|
|
export interface Army {
|
2017-11-07 14:02:49 +01:00
|
|
|
BLUFOR: {
|
2017-05-11 21:46:28 +02:00
|
|
|
squads: {
|
|
|
|
_id,
|
|
|
|
name,
|
|
|
|
memberCount,
|
|
|
|
members: {
|
|
|
|
_id,
|
|
|
|
username,
|
|
|
|
rank
|
|
|
|
}[],
|
|
|
|
}[],
|
|
|
|
memberCount
|
2018-03-07 11:56:50 +01:00
|
|
|
};
|
2017-11-07 14:02:49 +01:00
|
|
|
OPFOR: {
|
2017-05-11 21:46:28 +02:00
|
|
|
squads: {
|
|
|
|
_id,
|
|
|
|
name,
|
|
|
|
memberCount,
|
|
|
|
members: {
|
|
|
|
_id,
|
|
|
|
username,
|
|
|
|
rank
|
|
|
|
}[],
|
|
|
|
}[],
|
|
|
|
memberCount
|
2018-03-07 11:56:50 +01:00
|
|
|
};
|
2017-05-11 21:46:28 +02:00
|
|
|
}
|
2017-05-10 11:04:06 +02:00
|
|
|
|