import {
  IsString,
  IsOptional,
  IsBoolean,
  IsNumber,
  IsInt,
  IsUUID,
  MinLength,
  MaxLength,
  Min,
  Max,
} from "class-validator";

/**
 * DTO for creating a new personality/assistant configuration
 */
export class CreatePersonalityDto {
  @IsString()
  @MinLength(1)
  @MaxLength(100)
  name!: string; // unique identifier slug

  @IsString()
  @MinLength(1)
  @MaxLength(200)
  displayName!: string; // human-readable name

  @IsOptional()
  @IsString()
  @MaxLength(1000)
  description?: string;

  @IsString()
  @MinLength(10)
  systemPrompt!: string;

  @IsOptional()
  @IsNumber()
  @Min(0)
  @Max(2)
  temperature?: number; // null = use provider default

  @IsOptional()
  @IsInt()
  @Min(1)
  maxTokens?: number; // null = use provider default

  @IsOptional()
  @IsUUID("4")
  llmProviderInstanceId?: string; // FK to LlmProviderInstance

  @IsOptional()
  @IsBoolean()
  isDefault?: boolean;

  @IsOptional()
  @IsBoolean()
  isEnabled?: boolean;
}
