// dto/generate-content.dto.ts
import { IsEnum, IsOptional, IsString, IsBoolean, MaxLength } from 'class-validator';
import {ContentStyle} from "../enum/style.enum";
import {Platform} from "../enum/platform.enum";
import {ContentTone} from "../enum/tone.enum";
import {AccountTier} from "../enum/account-tier.enum";
import {PostLength} from "../enum/post-length.enum";

export class GenerateContentDto {
    @IsString()
    @MaxLength(5000)
    topic: string; // chủ đề / input thô từ user

    @IsEnum(Platform)
    platform?: Platform;

    @IsOptional()
    @IsEnum(AccountTier)
    accountTier?: AccountTier; // 👈 mới

    @IsOptional()
    @IsEnum(PostLength)
    postLength?: PostLength; // 👈 user override length

    @IsOptional()
    @IsEnum(ContentStyle)
    style?: ContentStyle; // nếu không truyền -> auto-detect

    @IsOptional()
    @IsEnum(ContentTone)
    tone?: ContentTone;

    @IsOptional()
    @IsString()
    language?: string; // 'vi' | 'en' ... default 'en'

    @IsOptional()
    @IsBoolean()
    enableReview?: boolean; // bật AI reviewer

    @IsOptional()
    @IsBoolean()
    useXEnrichment?: boolean; // bật X Enrichment reviewer

    @IsOptional()
    @IsString()
    extraInstructions?: string;
}
