import { IsEnum, IsInt, Min } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
import { PlanType } from '../entities/client.entity';

export class PlanResponseDto {
  @ApiProperty({
    description: 'Unique identifier of the client',
    example: '123e4567-e89b-12d3-a456-426614174000',
  })
  @IsInt({ message: 'Client ID must be an integer' })
  clientId: string;

  @ApiProperty({
    enum: PlanType,
    description: 'Current plan of the client',
    example: PlanType.BASIC,
  })
  @IsEnum(PlanType, { message: 'Plan must be one of: free, basic, premium, enterprise' })
  plan: PlanType;

  @ApiProperty({
    description: 'Maximum number of users allowed under this client plan',
    example: 10,
  })
  @IsInt({ message: 'Max users must be an integer' })
  @Min(1, { message: 'Max users must be at least 1' })
  maxUsers: number;
}
