Apply consistent import ordering and indentation in frontend and backend files. Ensure better maintainability and adherence to code style standards.
31 lines
462 B
TypeScript
31 lines
462 B
TypeScript
import {
|
|
IsArray,
|
|
IsEnum,
|
|
IsNotEmpty,
|
|
IsOptional,
|
|
IsString,
|
|
IsUUID,
|
|
MaxLength,
|
|
} from "class-validator";
|
|
import { ContentType } from "./create-content.dto";
|
|
|
|
export class UploadContentDto {
|
|
@IsEnum(ContentType)
|
|
type!: "meme" | "gif";
|
|
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
@MaxLength(255)
|
|
title!: string;
|
|
|
|
@IsOptional()
|
|
@IsUUID()
|
|
categoryId?: string;
|
|
|
|
@IsOptional()
|
|
@IsArray()
|
|
@IsString({ each: true })
|
|
@MaxLength(64, { each: true })
|
|
tags?: string[];
|
|
}
|