import { IsOptional, IsInt, IsDateString, IsEnum } from 'class-validator';
import { Type } from 'class-transformer';

export enum ReportType {
  LEAVES    = 'leaves',
  BALANCES  = 'balances',
  PLANNING  = 'planning',
}

export enum ExportFormat {
  EXCEL = 'excel',
  CSV   = 'csv',
  PDF   = 'pdf',
}

export class ReportFiltersDto {
  @IsOptional()
  @IsDateString()
  start_date?: string;

  @IsOptional()
  @IsDateString()
  end_date?: string;

  @IsOptional()
  @IsInt()
  @Type(() => Number)
  team_id?: number;

  @IsOptional()
  @IsInt()
  @Type(() => Number)
  user_id?: number;

  @IsOptional()
  @IsEnum(ReportType)
  type?: ReportType;
}