- Introduced support for nested comment replies in both frontend and backend. - Added comment liking and unliking features, including like count and "isLiked" state tracking. - Updated database schema with `parentId` and new `comment_likes` table. - Enhanced UI for threaded comments and implemented display of like counts and reply actions. - Refactored APIs and repositories to support replies, likes, and enriched comment data.
19 lines
237 B
TypeScript
19 lines
237 B
TypeScript
import {
|
|
IsNotEmpty,
|
|
IsOptional,
|
|
IsString,
|
|
IsUUID,
|
|
MaxLength,
|
|
} from "class-validator";
|
|
|
|
export class CreateCommentDto {
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
@MaxLength(1000)
|
|
text!: string;
|
|
|
|
@IsOptional()
|
|
@IsUUID()
|
|
parentId?: string;
|
|
}
|