import { Transform } from 'class-transformer';
import { IsEnum, IsOptional } from 'class-validator';
import { PaginationQueryDto } from '../../../common/dto/pagination-query.dto';
import {
  COLLABORATION_REQUEST_STATUSES,
  CollaborationRequestStatus,
} from '../schemas/collaboration-request.schema';

export class CollaborationRequestQueryDto extends PaginationQueryDto {
  @IsOptional()
  @Transform(({ value }) => (typeof value === 'string' ? value.trim().toLowerCase() : value))
  @IsEnum(COLLABORATION_REQUEST_STATUSES)
  status?: CollaborationRequestStatus;
}
