import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { IsString, IsNotEmpty, IsOptional, IsBoolean } from 'class-validator';

export class CreatePipelineDto {
  @ApiProperty({ description: 'Pipeline name', example: 'Продажи B2B' })
  @IsString()
  @IsNotEmpty()
  name: string;

  @ApiPropertyOptional({ description: 'Entity type', default: 'deal', example: 'deal' })
  @IsString()
  @IsOptional()
  entityType?: string;

  @ApiPropertyOptional({ description: 'Is default pipeline', default: false })
  @IsBoolean()
  @IsOptional()
  isDefault?: boolean;
}
