package com.ruoyi.bst.articleCategory.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.TreeEntity;
import com.ruoyi.common.core.interfaces.LogBizParam;
import com.ruoyi.common.core.validate.ValidGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * 文章分类对象 bst_article_category
 *
 * @author ruoyi
 * @date 2025-03-27
 */
@Data
public class ArticleCategory extends TreeEntity implements LogBizParam
{
    private static final long serialVersionUID = 1L;

    private Long id;

    @Excel(name = "分类名称")
    @ApiModelProperty("分类名称")
    @NotBlank(message = "分类名称不能为空", groups = {ValidGroup.Create.class})
    private String categoryName;

    @Excel(name = "状态：0-禁用 1-启用")
    @ApiModelProperty("状态：0-禁用 1-启用")
    @NotBlank(message = "状态不能为空", groups = {ValidGroup.Create.class})
    private String categoryStatus;

    @Excel(name = "父分类ID")
    @ApiModelProperty("父分类ID")
    private Long parentId;

    @Excel(name = "排序权重")
    @ApiModelProperty("排序权重")
    private Integer sort;

    @Override
    public Object logBizId() {
        return id;
    }
}
