import { IsArray, IsOptional, IsString, MaxLength } from "class-validator";

export class UpsertFaqDto {
  @IsString()
  @MaxLength(500)
  question!: string;

  @IsString()
  answer!: string;

  // Page titles this FAQ is tagged to — stored as a JSON array (see
  // FaqItem.pages). Empty array/omitted means untagged.
  @IsOptional()
  @IsArray()
  @IsString({ each: true })
  pages?: string[] | null;
}
