import { IsString, IsIn, IsOptional, IsBoolean, MinLength, MaxLength } from "class-validator"; export const FORMALITY_LEVELS = [ "VERY_CASUAL", "CASUAL", "NEUTRAL", "FORMAL", "VERY_FORMAL", ] as const; export type FormalityLevel = (typeof FORMALITY_LEVELS)[number]; export class CreatePersonalityDto { @IsString() @MinLength(1) @MaxLength(100) name!: string; @IsOptional() @IsString() @MaxLength(500) description?: string; @IsString() @MinLength(1) @MaxLength(50) tone!: string; @IsIn(FORMALITY_LEVELS) formalityLevel!: FormalityLevel; @IsString() @MinLength(10) systemPromptTemplate!: string; @IsOptional() @IsBoolean() isDefault?: boolean; @IsOptional() @IsBoolean() isActive?: boolean; }