forked from Yara724/api
Fix v3 mirror flow
This commit is contained in:
36
src/common/dto/unified-file-status-report.dto.ts
Normal file
36
src/common/dto/unified-file-status-report.dto.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import { ApiProperty } from "@nestjs/swagger";
|
||||
import {
|
||||
UNIFIED_FILE_STATUS_KEYS,
|
||||
UnifiedFileStatusDefinition,
|
||||
UnifiedFileStatusKey,
|
||||
} from "src/helpers/unified-file-status";
|
||||
|
||||
export class UnifiedFileStatusDefinitionDto implements UnifiedFileStatusDefinition {
|
||||
@ApiProperty({ enum: UNIFIED_FILE_STATUS_KEYS })
|
||||
key: UnifiedFileStatusKey;
|
||||
|
||||
@ApiProperty()
|
||||
labelEn: string;
|
||||
|
||||
@ApiProperty()
|
||||
labelFa: string;
|
||||
|
||||
@ApiProperty()
|
||||
description: string;
|
||||
}
|
||||
|
||||
export class UnifiedFileStatusReportDto {
|
||||
@ApiProperty({ type: [UnifiedFileStatusDefinitionDto] })
|
||||
statuses: UnifiedFileStatusDefinitionDto[];
|
||||
|
||||
@ApiProperty({
|
||||
description: "Counts per unified status key plus `all`",
|
||||
example: {
|
||||
all: 42,
|
||||
IN_PROGRESS: 10,
|
||||
WAITING_FOR_DAMAGE_EXPERT: 5,
|
||||
COMPLETED: 12,
|
||||
},
|
||||
})
|
||||
counts: Record<string, number>;
|
||||
}
|
||||
Reference in New Issue
Block a user