export class Ban { id: number = 0; steam_id: string|undefined; account_id: number|undefined; player_name: string|undefined; ban_length: number=0; ban_length_seconds: number = 0; ban_reason: string|undefined; banned_by: string|undefined; banned_by_id: string|undefined; ip: string|undefined; timestamp: Date|undefined; ban_utime: number = 0; active: boolean|undefined; unbanned_by_id: string = ""; unbanned_timestamp: Date|undefined; admin_info: any; unbanned_admin_info: any; static createFakeBanObject(reason: string, id: number = Number.MAX_VALUE) { const b = new Ban(); b.id = id; b.ban_reason = reason; return b; } unbannedAfterTime(): boolean { return this.unbanned_by_id == "STEAM_0:0:0"; } unbannedByModerator(): boolean { return !this.unbannedAfterTime(); } }