import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; import { IsEnum, IsOptional, IsString, IsBoolean, IsDateString, } from 'class-validator'; import { ExportFormat, ExportType } from '../entities/export-job.entity'; export class ExportInventoryDto { @ApiProperty({ description: 'Formato de exportación', enum: ExportFormat, example: ExportFormat.CSV, }) @IsEnum(ExportFormat) format: ExportFormat; @ApiPropertyOptional({ description: 'Filtrar por categoría', example: 'Bebidas', }) @IsOptional() @IsString() category?: string; @ApiPropertyOptional({ description: 'Solo items con stock bajo', example: false, }) @IsOptional() @IsBoolean() lowStockOnly?: boolean; } export class ExportReportDto { @ApiProperty({ description: 'Tipo de reporte', enum: ExportType, example: ExportType.REPORT_VALUATION, }) @IsEnum(ExportType) type: ExportType; @ApiProperty({ description: 'Formato de exportación', enum: ExportFormat, example: ExportFormat.EXCEL, }) @IsEnum(ExportFormat) format: ExportFormat; @ApiPropertyOptional({ description: 'Fecha de inicio del periodo', example: '2024-01-01', }) @IsOptional() @IsDateString() startDate?: string; @ApiPropertyOptional({ description: 'Fecha de fin del periodo', example: '2024-01-31', }) @IsOptional() @IsDateString() endDate?: string; } export class ExportJobResponseDto { @ApiProperty({ description: 'ID del trabajo de exportación' }) jobId: string; @ApiProperty({ description: 'Mensaje informativo' }) message: string; }