import { IsArray, IsIn, IsOptional, IsString } from 'class-validator';

export class CreateVersionPlanDto {
  @IsIn(['research', 'product', 'ui'])
  type!: 'research' | 'product' | 'ui';

  @IsString()
  title!: string;

  @IsString()
  @IsOptional()
  status?: string;

  @IsString()
  @IsOptional()
  owner?: string;

  @IsString()
  @IsOptional()
  ownerId?: string;

  @IsString()
  @IsOptional()
  startTime?: string;

  @IsString()
  @IsOptional()
  endTime?: string;

  @IsString()
  @IsOptional()
  expectedStartAt?: string;

  @IsString()
  @IsOptional()
  expectedEndAt?: string;

  @IsString()
  @IsOptional()
  actualStartAt?: string;

  @IsString()
  @IsOptional()
  completedAt?: string;

  @IsString()
  @IsOptional()
  resultUrl?: string;

  @IsArray()
  @IsOptional()
  linkedRequirementIds?: string[];

  @IsOptional()
  requirementCoverage?: unknown[];

  @IsOptional()
  logs?: unknown[];
}
