package com.starry.admin.modules.system.vo;

import com.starry.admin.modules.system.module.entity.SysRoleEntity;
import com.starry.common.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Set;
import javax.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author admin
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(value = "角色添加参数", description = "新增系统角色的请求参数")
public class SysRoleAddVo extends BaseEntity<SysRoleEntity> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "角色ID", hidden = true, notes = "新增时无需填写，系统自动生成")
    private Long roleId;

    @NotBlank(message = "角色名称不能为空")
    @ApiModelProperty(value = "角色名称", required = true, example = "管理员", notes = "角色显示名称")
    private String roleName;

    @ApiModelProperty(value = "角色描述", example = "系统管理员", notes = "角色的详细描述")
    private String description;

    @ApiModelProperty(value = "角色状态", example = "0", notes = "0-正常，1-停用")
    private Integer status;

    @ApiModelProperty(value = "数据权限范围", example = "1", notes = "1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限 5:仅本人数据权限")
    private String dataScope;

    @ApiModelProperty(value = "菜单树选择项是否关联显示", example = "true")
    private boolean menuCheckStrictly;

    @ApiModelProperty(value = "部门树选择项是否关联显示", example = "true")
    private boolean deptCheckStrictly;

    @ApiModelProperty(value = "权限字符", required = true, example = "admin", notes = "角色权限字符串")
    private String roleKey;

    @ApiModelProperty(value = "租户ID", example = "1", notes = "角色所属租户ID")
    private Long tenantId;

    /**
     * 菜单组
     */
    @ApiModelProperty(value = "菜单ID数组", notes = "角色关联的菜单ID列表")
    private Long[] menuIds;

    /**
     * 部门组（数据权限）
     */
    @ApiModelProperty(value = "部门ID数组", notes = "角色关联的部门ID列表，用于数据权限")
    private Long[] deptIds;

    /**
     * 角色菜单权限
     */
    @ApiModelProperty(value = "角色权限集合", notes = "角色拥有的菜单权限列表")
    private Set<String> permissions;

}
