package org.xyzh.common.vo;

import org.xyzh.common.dto.permission.TbResourcePermission;

/**
 * @description 资源权限视图对象
 * @filename ResourcePermissionVO.java
 * @author yslg
 * @copyright xyzh
 * @since 2025-10-29
 */
public class ResourcePermissionVO extends TbResourcePermission {
    
    private static final long serialVersionUID = 1L;
    
    /**
     * @description 部门名称
     */
    private String deptName;
    
    /**
     * @description 角色名称
     */
    private String roleName;
    
    /**
     * @description 资源标题（根据资源类型获取）
     */
    private String resourceTitle;
    
    /**
     * @description 查询用的用户ID（用于权限校验）
     */
    private String userID;
    
    /**
     * @description 用户的部门ID列表（用于权限校验）
     */
    private String[] userDeptIDs;
    
    /**
     * @description 用户的角色ID列表（用于权限校验）
     */
    private String[] userRoleIDs;

    public ResourcePermissionVO() {
        super();
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getResourceTitle() {
        return resourceTitle;
    }

    public void setResourceTitle(String resourceTitle) {
        this.resourceTitle = resourceTitle;
    }

    public String getUserID() {
        return userID;
    }

    public void setUserID(String userID) {
        this.userID = userID;
    }

    public String[] getUserDeptIDs() {
        return userDeptIDs;
    }

    public void setUserDeptIDs(String[] userDeptIDs) {
        this.userDeptIDs = userDeptIDs;
    }

    public String[] getUserRoleIDs() {
        return userRoleIDs;
    }

    public void setUserRoleIDs(String[] userRoleIDs) {
        this.userRoleIDs = userRoleIDs;
    }

    @Override
    public String toString() {
        return "ResourcePermissionVO{" +
                "id=" + getID() +
                ", resourceType=" + getResourceType() +
                ", resourceID='" + getResourceID() + '\'' +
                ", resourceTitle='" + resourceTitle + '\'' +
                ", deptID='" + getDeptID() + '\'' +
                ", deptName='" + deptName + '\'' +
                ", roleID='" + getRoleID() + '\'' +
                ", roleName='" + roleName + '\'' +
                ", canRead=" + getCanRead() +
                ", canWrite=" + getCanWrite() +
                ", canExecute=" + getCanExecute() +
                ", creator='" + getCreator() + '\'' +
                ", updater='" + getUpdater() + '\'' +
                ", createTime=" + getCreateTime() +
                ", updateTime=" + getUpdateTime() +
                ", deleted=" + getDeleted() +
                '}';
    }
}

