package cn.meowrain.aioj.backend.blogservice.dto.req;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

/**
 * 评论创建请求DTO
 *
 * @author AIOJ
 */
@Data
@Schema(description = "评论创建请求")
public class CommentCreateRequestDTO {

    @NotNull(message = "文章ID不能为空")
    @Schema(description = "文章ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long articleId;

    @NotBlank(message = "评论内容不能为空")
    @Schema(description = "评论内容（支持Markdown）", requiredMode = Schema.RequiredMode.REQUIRED, example = "这篇文章写得很好！")
    private String content;

    @Schema(description = "父评论ID（0表示一级评论）", example = "0")
    private Long parentId = 0L;

    @Schema(description = "回复的评论ID（用于@提醒）", example = "0")
    private Long replyToId = 0L;
}
