package com.simuwang.manage.dto;

import java.util.Objects;

/**
 * @author wangzaijun
 * @date 2024/9/13 8:40
 * @description 用户角色对象
 */
public class UserRoleDTO {
    /**
     * 角色id
     */
    private Integer roleId;
    /**
     * 角色名称
     */
    private String roleName;
    /**
     * 角色代码
     */
    private String roleKey;

    public UserRoleDTO() {
    }

    public UserRoleDTO(Integer roleId, String roleName, String roleKey) {
        this.roleId = roleId;
        this.roleName = roleName;
        this.roleKey = roleKey;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public String getRoleName() {
        return roleName;
    }

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

    public String getRoleKey() {
        return roleKey;
    }

    public void setRoleKey(String roleKey) {
        this.roleKey = roleKey;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserRoleDTO that = (UserRoleDTO) o;
        return roleId.equals(that.roleId) && roleName.equals(that.roleName) && roleKey.equals(that.roleKey);
    }

    @Override
    public int hashCode() {
        return Objects.hash(roleId, roleName, roleKey);
    }
}
