1
0
Files
aaaa/src/posts/dto/create-post.dto.ts
2025-11-13 11:09:27 +04:00

20 lines
488 B
TypeScript

import { ApiProperty } from "@nestjs/swagger";
import { IsNotEmpty, IsString, Length } from "class-validator";
export class CreatePostDto {
@ApiProperty({ example: "Заголовок" })
@IsString()
@Length(1, 200)
title: string;
@ApiProperty({ example: "Краткое описание" })
@IsString()
@Length(1, 400)
shortDescription: string;
@ApiProperty({ example: "Полное описание..." })
@IsString()
@IsNotEmpty()
fullDescription: string;
}