import { IsOptional, IsInt, Min, Max, IsString, IsEnum, IsArray } from "class-validator";
import { Type } from "class-transformer";
import { EntryStatus } from "@prisma/client";

/**
 * Query parameters for entry-centered graph view
 */
export class GraphQueryDto {
  @IsOptional()
  @Type(() => Number)
  @IsInt()
  @Min(1)
  @Max(5)
  depth?: number = 1;
}

/**
 * Query parameters for full graph view with filtering
 */
export class GraphFilterDto {
  @IsOptional()
  @IsArray()
  @IsString({ each: true })
  tags?: string[];

  @IsOptional()
  @IsEnum(EntryStatus)
  status?: EntryStatus;

  @IsOptional()
  @Type(() => Number)
  @IsInt()
  @Min(1)
  @Max(1000)
  limit?: number;
}
