import { IsArray, IsEnum, IsInt, IsNotEmpty, IsOptional, IsString, IsUUID, MaxLength, } from "class-validator"; export enum ContentType { MEME = "meme", GIF = "gif", } export class CreateContentDto { @IsEnum(ContentType) type!: "meme" | "gif"; @IsString() @IsNotEmpty() @MaxLength(255) title!: string; @IsString() @IsNotEmpty() @MaxLength(512) storageKey!: string; @IsString() @IsNotEmpty() @MaxLength(128) mimeType!: string; @IsInt() fileSize!: number; @IsOptional() @IsUUID() categoryId?: string; @IsOptional() @IsArray() @IsString({ each: true }) @MaxLength(64, { each: true }) tags?: string[]; }