package com.yuchen.saas.manage.system.api.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nest.springwrap.core.tenant.mp.TenantEntity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * <p>
 * 组织角色
 * </p>
 *
 * @author author
 * @since 2023-03-17
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("nest_org_role")
public class NestOrgRole extends TenantEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 角色名称
     */
    @NotBlank
    @Size(max = 20)
    @ApiModelProperty(value = "角色名称")
    private String name;

    /**
     * 是否默认分组:0否1是(是的话不能进行删除操作)
     */
    @ApiModelProperty(value = "是否默认分组:0否1是(是的话不能进行删除操作)")
    private Integer isDefault;

    @ApiModelProperty(value = "角色类型,0正常的,1主管理员,2子管理员(主管)")
    private Integer type;

    /**
     * 组织id
     */
    @ApiModelProperty(value = "组织id")
    private Long deptId;

    /**
     * 角色分组id
     */
    @NotNull
    @ApiModelProperty(value = "角色分组id")
    private Long roleGroupId;

    /**
     * 开启状态 0:关闭;1:开启
     */
    @ApiModelProperty(value = "开启状态 0:关闭;1:开启")
    private Integer isOpen;

}
