package org.xyzh.common.dto.permission;

import org.xyzh.common.dto.BaseDTO;

/**
 * @description 统一资源权限控制表
 * @filename TbResourcePermission.java
 * @author yslg
 * @copyright xyzh
 * @since 2025-10-15
 */
public class TbResourcePermission extends BaseDTO {
    
    private static final long serialVersionUID = 1L;
    
    /**
     * @description 资源类型（1资源/新闻 2课程 3课程章节 4学习任务）
     */
    private Integer resourceType;
    
    /**
     * @description 资源ID
     */
    private String resourceID;
    
    /**
     * @description 部门ID（NULL表示不限制部门）
     */
    private String deptID;
    
    /**
     * @description 角色ID（NULL表示不限制角色）
     */
    private String roleID;
    
    /**
     * @description 读权限（0否 1是）
     */
    private Boolean canRead;
    
    /**
     * @description 写权限（0否 1是）
     */
    private Boolean canWrite;
    
    /**
     * @description 执行权限（0否 1是）
     */
    private Boolean canExecute;
    
    /**
     * @description 创建者
     */
    private String creator;
    
    /**
     * @description 更新者
     */
    private String updater;

    public Integer getResourceType() {
        return resourceType;
    }

    public void setResourceType(Integer resourceType) {
        this.resourceType = resourceType;
    }

    public String getResourceID() {
        return resourceID;
    }

    public void setResourceID(String resourceID) {
        this.resourceID = resourceID;
    }

    public String getDeptID() {
        return deptID;
    }

    public void setDeptID(String deptID) {
        this.deptID = deptID;
    }

    public String getRoleID() {
        return roleID;
    }

    public void setRoleID(String roleID) {
        this.roleID = roleID;
    }

    public Boolean getCanRead() {
        return canRead;
    }

    public void setCanRead(Boolean canRead) {
        this.canRead = canRead;
    }

    public Boolean getCanWrite() {
        return canWrite;
    }

    public void setCanWrite(Boolean canWrite) {
        this.canWrite = canWrite;
    }

    public Boolean getCanExecute() {
        return canExecute;
    }

    public void setCanExecute(Boolean canExecute) {
        this.canExecute = canExecute;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public String getUpdater() {
        return updater;
    }

    public void setUpdater(String updater) {
        this.updater = updater;
    }

    @Override
    public String toString() {
        return "TbResourcePermission{" +
                "id=" + getID() +
                ", resourceType=" + resourceType +
                ", resourceID='" + resourceID + '\'' +
                ", deptID='" + deptID + '\'' +
                ", roleID='" + roleID + '\'' +
                ", canRead=" + canRead +
                ", canWrite=" + canWrite +
                ", canExecute=" + canExecute +
                ", creator='" + creator + '\'' +
                ", updater='" + updater + '\'' +
                ", createTime=" + getCreateTime() +
                ", updateTime=" + getUpdateTime() +
                ", deleted=" + getDeleted() +
                '}';
    }
}

