opt-cc/static/src/app/models/model-interfaces.ts

87 lines
1.3 KiB
TypeScript
Raw Normal View History

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;
squad?: Squad;
rank?: Rank;
awards?: Award[];
}
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;
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;
2017-05-10 11:04:06 +02:00
}
2017-06-10 13:16:15 +02:00
export interface Promotion {
userId?: string
oldRankLvl: number,
newRankLvl: number
}
2017-05-10 11:04:06 +02:00
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
},
}
2017-05-10 11:04:06 +02:00