mirror of
https://github.com/immich-app/immich.git
synced 2025-12-24 09:14:58 +03:00
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { IntegrityReportType } from 'src/enum';
|
|
import { ValidateEnum } from 'src/validation';
|
|
|
|
export class IntegrityReportSummaryResponseDto {
|
|
@ApiProperty({ type: 'integer' })
|
|
[IntegrityReportType.ChecksumFail]!: number;
|
|
@ApiProperty({ type: 'integer' })
|
|
[IntegrityReportType.MissingFile]!: number;
|
|
@ApiProperty({ type: 'integer' })
|
|
[IntegrityReportType.OrphanFile]!: number;
|
|
}
|
|
|
|
export class IntegrityGetReportDto {
|
|
@ValidateEnum({ enum: IntegrityReportType, name: 'IntegrityReportType' })
|
|
type!: IntegrityReportType;
|
|
|
|
// todo: paginate
|
|
// @IsInt()
|
|
// @Min(1)
|
|
// @Type(() => Number)
|
|
// @Optional()
|
|
// page?: number;
|
|
}
|
|
|
|
export class IntegrityDeleteReportDto {
|
|
@ValidateEnum({ enum: IntegrityReportType, name: 'IntegrityReportType' })
|
|
type!: IntegrityReportType;
|
|
}
|
|
|
|
class IntegrityReportDto {
|
|
id!: string;
|
|
@ValidateEnum({ enum: IntegrityReportType, name: 'IntegrityReportType' })
|
|
type!: IntegrityReportType;
|
|
path!: string;
|
|
}
|
|
|
|
export class IntegrityReportResponseDto {
|
|
items!: IntegrityReportDto[];
|
|
}
|