import { IsIn, Matches } from 'class-validator';

export class CashboxExportQueryDto {
  @Matches(/^\d{4}-\d{2}-\d{2}$/)
  from: string;

  @Matches(/^\d{4}-\d{2}-\d{2}$/)
  to: string;

  @IsIn(['csv', 'pdf'])
  format: 'csv' | 'pdf';
}
