mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 09:58:12 +00:00
65 lines
1.3 KiB
TypeScript
65 lines
1.3 KiB
TypeScript
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
import { IsBoolean, IsEnum, IsNumber, IsOptional, IsString, IsUUID } from 'class-validator';
|
|
|
|
import {
|
|
INSPECTION_REPORT_TYPES,
|
|
INSPECTION_STATUSES,
|
|
InspectionReportType,
|
|
InspectionStatus,
|
|
} from '../entities/warehouse-inspection-report.entity';
|
|
|
|
export class CreateInspectionReportDto {
|
|
@ApiProperty({ enum: INSPECTION_REPORT_TYPES })
|
|
@IsEnum(INSPECTION_REPORT_TYPES)
|
|
reportType!: InspectionReportType;
|
|
|
|
@ApiProperty({ enum: INSPECTION_STATUSES })
|
|
@IsEnum(INSPECTION_STATUSES)
|
|
inspectionStatus!: InspectionStatus;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsBoolean()
|
|
hasDamage?: boolean;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsString()
|
|
damageDescription?: string;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsBoolean()
|
|
hasWeightLoss?: boolean;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsNumber()
|
|
expectedWeight?: number;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsNumber()
|
|
actualWeight?: number;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsBoolean()
|
|
hasMissingItems?: boolean;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsString()
|
|
missingItemsDescription?: string;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsString()
|
|
remarks?: string;
|
|
|
|
@ApiPropertyOptional({ format: 'uuid' })
|
|
@IsOptional()
|
|
@IsUUID()
|
|
inspectedById?: string;
|
|
}
|