package top.imwork.uaa.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * 角色信息
 *
 * @author jiangxiaowei
 * email: e-jiangxiaowei@outlook.com
 * date: 2025-12-09 16:29:22
 */
@TableName("sys_role")
public class SysRole implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * id
     */
    @TableId
    private Long id;
    /**
     * 父级角色
     */
    private Long parentId;
    /**
     * 角色分组 父级角色组id
     */
    private String parentIds;
    /**
     * 角色名称
     */
    private String roleName;
    /**
     * 角色类型0普通角色1普通管理员2区域管理员3平台管理员5系统管理员9超级管理员
     */
    private String roleType;
    /**
     * 角色描述
     */
    private String roleDesc;
    /**
     * 角色级别
     */
    private String roleLevel;
    /**
     * 是否系统数据0否1是
     */
    private Integer isSys;
    /**
     * 启用0否1是
     */
    private Integer enabled;
    /**
     * 排序
     */
    private Long sort;
    /**
     * 状态:对问题在某一时刻进展情况的数学描述,默认0
     */
    private Integer state;
    /**
     * 状态字符类型
     */
    private String status;
    /**
     * 是否删除默认0.未删除,1已删除
     */
    private String delFlag;
    /**
     * 创建人
     */
    private String creator;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 修改人
     */
    private String modifier;
    /**
     * 修改时间
     */
    private Date updateTime;
    /**
     * 备注
     */
    private String remark;

    @Override
    public String toString() {
        return "SysRole{" +
                "id=" + id +
                ", parentId=" + parentId +
                ", parentIds='" + parentIds + '\'' +
                ", roleName='" + roleName + '\'' +
                ", roleType='" + roleType + '\'' +
                ", roleDesc='" + roleDesc + '\'' +
                ", roleLevel='" + roleLevel + '\'' +
                ", isSys=" + isSys +
                ", enabled=" + enabled +
                ", sort=" + sort +
                ", state=" + state +
                ", status='" + status + '\'' +
                ", delFlag='" + delFlag + '\'' +
                ", creator='" + creator + '\'' +
                ", createTime=" + createTime +
                ", modifier='" + modifier + '\'' +
                ", updateTime=" + updateTime +
                ", remark='" + remark + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) return false;
        SysRole sysRole = (SysRole) o;
        return Objects.equals(id, sysRole.id) && Objects.equals(parentId, sysRole.parentId) && Objects.equals(parentIds, sysRole.parentIds) && Objects.equals(roleName, sysRole.roleName) && Objects.equals(roleType, sysRole.roleType) && Objects.equals(roleDesc, sysRole.roleDesc) && Objects.equals(roleLevel, sysRole.roleLevel) && Objects.equals(isSys, sysRole.isSys) && Objects.equals(enabled, sysRole.enabled) && Objects.equals(sort, sysRole.sort) && Objects.equals(state, sysRole.state) && Objects.equals(status, sysRole.status) && Objects.equals(delFlag, sysRole.delFlag) && Objects.equals(creator, sysRole.creator) && Objects.equals(createTime, sysRole.createTime) && Objects.equals(modifier, sysRole.modifier) && Objects.equals(updateTime, sysRole.updateTime) && Objects.equals(remark, sysRole.remark);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, parentId, parentIds, roleName, roleType, roleDesc, roleLevel, isSys, enabled, sort, state, status, delFlag, creator, createTime, modifier, updateTime, remark);
    }

    public String getRoleDesc() {
        return roleDesc;
    }

    public void setRoleDesc(String roleDesc) {
        this.roleDesc = roleDesc;
    }

    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 getParentIds() {
        return parentIds;
    }

    public void setParentIds(String parentIds) {
        this.parentIds = parentIds;
    }

    public String getRoleName() {
        return roleName;
    }

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

    public String getRoleType() {
        return roleType;
    }

    public void setRoleType(String roleType) {
        this.roleType = roleType;
    }

    public String getRoleLevel() {
        return roleLevel;
    }

    public void setRoleLevel(String roleLevel) {
        this.roleLevel = roleLevel;
    }

    public Integer getIsSys() {
        return isSys;
    }

    public void setIsSys(Integer isSys) {
        this.isSys = isSys;
    }

    public Integer getEnabled() {
        return enabled;
    }

    public void setEnabled(Integer enabled) {
        this.enabled = enabled;
    }

    public Long getSort() {
        return sort;
    }

    public void setSort(Long sort) {
        this.sort = sort;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getCreator() {
        return creator;
    }

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

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getModifier() {
        return modifier;
    }

    public void setModifier(String modifier) {
        this.modifier = modifier;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
