package com.zd.system.domain;

import com.zd.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

/**
 * 权限和菜单关联对象 sys_permit_menu
 *
 * @author liubo
 * @date 2022-03-21
 */
@ApiModel("权限和菜单关联")
public class SysPermitMenu extends BaseEntity {
    private static final long serialVersionUID = 1L;

    private Long id;
    /**
     * 权限ID type=1 时不能为空
     */
    @ApiModelProperty(value = "权限ID type=1 时不能为空")
    private Long permitId;
    /**
     * 菜单ID
     */
    @ApiModelProperty(value = "菜单ID 不能为空")
    private Long menuId;
    /**
     * 用户ID type=2 时不能为空
     */
    @ApiModelProperty(value = "用户ID type=2 时不能为空")
    private Long userId;
    /**
     * 关联类型 1 权限模板，2 个人权限
     */
    @ApiModelProperty(value = "关联类型 1 权限模板，2 个人权限")
    private Integer type;
    /**
     * 数据范围（1：全部数据权限 2：本部门以及下级部门 3：本部门以及指定部门（指定部门关联表中查询） 4：仅本人）
     */
    @ApiModelProperty(value = "数据范围（1：全部数据权限 2：本部门以及下级部门 3：本部门以及指定部门 4：仅本人）")
    private Integer dataScope;

    @ApiModelProperty(value = "父级ID")
    private Long parentId;

    @ApiModelProperty(value = "菜单类型")
    private String menuType;

    /**
     * 权限结构，前端渲染用
     */
    private String deptIdsList;

    @ApiModelProperty(value = "指定部门IDS dataScope = 3 时有效")
    private List<Long> deptIds;

    public void setPermitId(Long permitId) {
        this.permitId = permitId;
    }

    public Long getPermitId() {
        return permitId;
    }

    public void setMenuId(Long menuId) {
        this.menuId = menuId;
    }

    public Long getMenuId() {
        return menuId;
    }

    @Override
    public void setUserId(Long userId) {
        this.userId = userId;
    }

    @Override
    public Long getUserId() {
        return userId;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getType() {
        return type;
    }

    public void setDataScope(Integer dataScope) {
        this.dataScope = dataScope;
    }

    public Integer getDataScope() {
        return dataScope;
    }

    public List<Long> getDeptIds() {
        return deptIds;
    }

    public void setDeptIds(List<Long> deptIds) {
        this.deptIds = deptIds;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getMenuType() {
        return menuType;
    }

    public void setMenuType(String menuType) {
        this.menuType = menuType;
    }

    public String getDeptIdsList() {
        return deptIdsList;
    }

    public void setDeptIdsList(String deptIdsList) {
        this.deptIdsList = deptIdsList;
    }
}
