mirror of
https://github.com/volodymyrsmirnov/MalwareMultiScan.git
synced 2025-08-24 05:22:22 +00:00
32 lines
750 B
TypeScript
32 lines
750 B
TypeScript
import ScanResultEntry from '~/models/scan-result-entry';
|
|
import {ScanResultStatus} from '~/models/scan-result-status';
|
|
|
|
export default class ScanResultEntryFlattened implements ScanResultEntry {
|
|
readonly id: string;
|
|
readonly status: ScanResultStatus;
|
|
readonly duration: number;
|
|
readonly threats: string[];
|
|
|
|
constructor(id: string, status: ScanResultStatus, duration: number, threats: string[]) {
|
|
this.id = id;
|
|
this.status = status;
|
|
this.duration = duration;
|
|
this.threats = threats;
|
|
}
|
|
|
|
get completed()
|
|
{
|
|
return this.status != ScanResultStatus.Queued
|
|
}
|
|
|
|
get succeeded()
|
|
{
|
|
return this.status === ScanResultStatus.Succeeded;
|
|
}
|
|
|
|
get failed()
|
|
{
|
|
return this.status === ScanResultStatus.Failed;
|
|
}
|
|
}
|