import { IsEnum, IsObject, IsOptional, IsString, MaxLength, MinLength } from 'class-validator'

export class CreateReportDto {
  @IsString() @MinLength(1) @MaxLength(160)
  name!: string

  @IsOptional() @IsEnum(['health', 'revenue', 'churn', 'custom'])
  kind?: 'health' | 'revenue' | 'churn' | 'custom'

  @IsOptional() @IsString() @MaxLength(500)
  description?: string

  @IsOptional() @IsObject()
  definition?: Record<string, unknown>
}
