package org.springblade.material.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 素材分类表
 * </p>
 *
 * @author zbc
 * @since 2022-03-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class BladeMaterialCategory implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
	@ApiModelProperty(value = "主键ID")
    private Long id;

	@ApiModelProperty(value = "分类名称")
	@NotBlank(message = "分类名称不能为空")
    private String categoryName;

	@ApiModelProperty(value = "分类编码")
	private String categoryCode;

	@ApiModelProperty(value = "权限  0 仅自己  1 所有人 2 指定角色可见")
	@NotNull(message = "权限不能为空")
    private Integer permissions;

	@ApiModelProperty(value = "排序")
    private Integer sort;

	@ApiModelProperty(value = "角色ids")
    private String roleIds;

	@ApiModelProperty(value = "创建人")
    private Long createUser;

	@ApiModelProperty(value = "创建时间")
    private Date createTime;

	@ApiModelProperty(value = "素材数量")
	@TableField(exist = false)
	private Integer materialNum;

	@ApiModelProperty(value = "租户ID")
	private String tenantId;


}
