content: package cn.org.alan.exam.model.entity;
  
  import com.baomidou.mybatisplus.annotation.IdType;
  import com.baomidou.mybatisplus.annotation.TableId;
  import com.baomidou.mybatisplus.annotation.TableLogic;
  import com.baomidou.mybatisplus.annotation.TableName;
  import io.swagger.annotations.ApiModel;
  import io.swagger.annotations.ApiModelProperty;
  import lombok.Data;
  
  import javax.validation.constraints.NotBlank;
  import java.io.Serializable;
  import java.util.Date;
  
  /**
   * 分类实体类
   *
   * @author Moxuec
   * @since 2025-04-09
   */
  @Data
  @TableName("t_category")
  @ApiModel(value = "分类实体", description = "题库分类")
  public class Category implements Serializable {
  
      private static final long serialVersionUID = 1L;
  
      @ApiModelProperty(value = "分类ID")
      @TableId(value = "id", type = IdType.AUTO)
      private Integer id;
  
      @ApiModelProperty(value = "分类名称")
      @NotBlank(message = "分类名称不能为空")
      private String name;
  
      @ApiModelProperty(value = "父分类ID，0表示一级分类")
      private Integer parentId = 0;
  
      @ApiModelProperty(value = "排序")
      private Integer sort = 0;
  
      @ApiModelProperty(value = "创建时间")
      private Date createTime;
  
      @ApiModelProperty(value = "是否删除")
      @TableLogic
      private Integer isDeleted = 0;
  }