108 lines
1.6 KiB
TypeScript
108 lines
1.6 KiB
TypeScript
export interface AppUser {
|
|
_id?: string;
|
|
username?: string;
|
|
squad?: Squad;
|
|
secret?: string;
|
|
activated: boolean;
|
|
permission: number;
|
|
}
|
|
|
|
export interface User {
|
|
_id?: string;
|
|
boardUserId?: number;
|
|
username?: string;
|
|
squad?: Squad;
|
|
rank?: Rank;
|
|
awards?: Award[];
|
|
}
|
|
|
|
export interface Player {
|
|
_id?: string;
|
|
fraction?: string;
|
|
name?: string;
|
|
warId?: War;
|
|
kill?: number;
|
|
death?: number;
|
|
friendlyFire?: number;
|
|
respawn?: number;
|
|
flagTouch?: number;
|
|
}
|
|
export interface War {
|
|
_id?: string;
|
|
date?: Date;
|
|
ptBlufor?: number;
|
|
ptOpfor?: number;
|
|
bestPlayerId?: Player;
|
|
players: Player[];
|
|
}
|
|
|
|
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 {
|
|
_id?: string,
|
|
userId: string,
|
|
decorationId?: Decoration;
|
|
reason?: string;
|
|
proposer?: AppUser;
|
|
date?: number; // since Date.now() returns a number
|
|
confirmed?: number;
|
|
}
|
|
|
|
export interface Promotion {
|
|
_id?: string;
|
|
userId?: string
|
|
oldRankLvl: number,
|
|
newRankLvl: number
|
|
}
|
|
|
|
export interface Decoration {
|
|
_id?: string;
|
|
name?: string;
|
|
description?: string;
|
|
fraction?: string;
|
|
sortingNumber?: number;
|
|
isMedal?: boolean;
|
|
}
|
|
|
|
export interface Army {
|
|
NATO: {
|
|
squads: {
|
|
_id,
|
|
name,
|
|
memberCount,
|
|
members: {
|
|
_id,
|
|
username,
|
|
rank
|
|
}[],
|
|
}[],
|
|
memberCount
|
|
},
|
|
CSAT: {
|
|
squads: {
|
|
_id,
|
|
name,
|
|
memberCount,
|
|
members: {
|
|
_id,
|
|
username,
|
|
rank
|
|
}[],
|
|
}[],
|
|
memberCount
|
|
},
|
|
}
|
|
|