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 CategoryCreateRequestDTO {

    @NotBlank(message = "分类名称不能为空")
    @Schema(description = "分类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "算法题解")
    private String name;

    @NotBlank(message = "分类别名不能为空")
    @Schema(description = "分类别名（URL友好标识）", requiredMode = Schema.RequiredMode.REQUIRED, example = "algorithm-solutions")
    private String slug;

    @Schema(description = "分类描述", example = "算法题目解题思路和代码分享")
    private String description;

    @Schema(description = "分类图标", example = "💡")
    private String icon;

    @NotNull(message = "排序序号不能为空")
    @Schema(description = "排序序号（越小越靠前）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Integer sortOrder;

    @Schema(description = "父分类ID（0表示顶级分类）", example = "0")
    private Long parentId = 0L;

    @Schema(description = "是否启用（1=启用，0=禁用）", example = "1")
    private Integer isEnabled = 1;
}
