package com.qiaoba.api.system.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.qiaoba.common.base.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 角色信息 sys_role
 *
 * @author ailanyin
 * @version 1.0
 * @since 2022-09-22 04:20:28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_role")
public class SysRole extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId
    @Excel(name = "角色序号", width = 20)
    private String roleId;

    @Excel(name = "角色名称", width = 20)
    private String roleName;

    @Excel(name = "权限字符", width = 20)
    private String roleKey;

    @Excel(name = "角色序号", width = 20)
    private Integer roleSort;

    @Excel(name = "数据范围", width = 20, replace = {"所有数据权限_1", "自定义数据权限_2", "本部门数据权限_3", "本部门及以下数据权限_4", "仅本人数据权限_5"})
    private String dataScope;

    /**
     * 菜单树选择项是否关联显示（ 0：父子不互相关联显示 1：父子互相关联显示）
     */
    @TableField(exist = false)
    private final boolean menuCheckStrictly = true;

    /**
     * 部门树选择项是否关联显示（0：父子不互相关联显示 1：父子互相关联显示 ）
     */
    @TableField(exist = false)
    private final boolean deptCheckStrictly = true;

    @Excel(name = "状态", width = 20, replace = {"正常_1", "禁用_0"})
    private String status;

}
