package com.mosty.common.core.business.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * 角色表
 * @TableName sys_role
 */
@TableName(value ="mosty_base.sys_role")
@Data
public class SysRole implements Serializable {
    /**
     * 主键id
     */
    @ApiModelProperty(value = "角色ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 角色名称
     */
    @ApiModelProperty(value = "角色名称")
    @TableField(value = "role_name")
    private String roleName;

    /**
     * 角色编码
     */
    @ApiModelProperty(value = "角色编码")
    @TableField(value = "role_code")
    private String roleCode;

    /**
     * 角色描述
     */
    @ApiModelProperty(value = "角色描述")
    @TableField(value = "role_desc")
    private String roleDesc;

    /**
     * 排序号
     */
    @ApiModelProperty(value = "排序号")
    @TableField(value = "order_no")
    private Integer orderNo;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @TableField(value = "bz")
    private String bz;

    /**
     * 采集时间
     */
    @ApiModelProperty(value = "采集时间")
    @TableField(value = "xt_cjsj")
    private Date xtCjsj;

    /**
     * 录入时间
     */
    @ApiModelProperty(value = "录入时间")
    @TableField(value = "xt_lrsj")
    private Date xtLrsj;

    /**
     * 录入人姓名
     */
    @ApiModelProperty(value = "录入人姓名")
    @TableField(value = "xt_lrrxm")
    private String xtLrrxm;

    /**
     * 录入人ID
     */
    @ApiModelProperty(value = "录入人ID")
    @TableField(value = "xt_lrrid")
    private String xtLrrid;

    /**
     * 录入人部门
     */
    @ApiModelProperty(value = "录入人部门")
    @TableField(value = "xt_lrrbm")
    private String xtLrrbm;

    /**
     * 录入人部门ID
     */
    @ApiModelProperty(value = "录入人部门ID")
    @TableField(value = "xt_lrrbmid")
    private String xtLrrbmid;

    /**
     * 录入IP
     */
    @ApiModelProperty(value = "录入IP")
    @TableField(value = "xt_lrip")
    private String xtLrip;

    /**
     * 最后修改时间
     */
    @ApiModelProperty(value = "最后修改时间")
    @TableField(value = "xt_zhxgsj")
    private Date xtZhxgsj;

    /**
     * 最后修改人姓名
     */
    @ApiModelProperty(value = "最后修改人姓名")
    @TableField(value = "xt_zhxgrxm")
    private String xtZhxgrxm;

    /**
     * 最后修改人ID
     */
    @ApiModelProperty(value = "最后修改人ID")
    @TableField(value = "xt_zhxgrid")
    private String xtZhxgrid;

    /**
     * 最后修改人部门
     */
    @ApiModelProperty(value = "最后修改人部门")
    @TableField(value = "xt_zhxgrbm")
    private String xtZhxgrbm;

    /**
     * 最后修改人部门ID
     */
    @ApiModelProperty(value = "最后修改人部门ID")
    @TableField(value = "xt_zhxgrbmid")
    private String xtZhxgrbmid;

    /**
     * 最后修改IP
     */
    @ApiModelProperty(value = "最后修改IP")
    @TableField(value = "xt_zhxgip")
    private String xtZhxgip;

    /**
     * 注销标志0正常 1.注销
     */
    @ApiModelProperty(value = "注销标志0正常 1.注销")
    @TableField(value = "xt_zxbz")
    private Integer xtZxbz;

    /**
     * 注销原因
     */
    @ApiModelProperty(value = "注销原因")
    @TableField(value = "xt_zxyy")
    private String xtZxyy;


    /**
     * 数据权限等级
     */
    @ApiModelProperty(value = "数据权限等级")
    @TableField(value = "data_permission_level")
    private String dataPermissionLevel;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysRole other = (SysRole) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getRoleName() == null ? other.getRoleName() == null : this.getRoleName().equals(other.getRoleName()))
            && (this.getRoleDesc() == null ? other.getRoleDesc() == null : this.getRoleDesc().equals(other.getRoleDesc()))
            && (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo()))
            && (this.getBz() == null ? other.getBz() == null : this.getBz().equals(other.getBz()))
            && (this.getXtCjsj() == null ? other.getXtCjsj() == null : this.getXtCjsj().equals(other.getXtCjsj()))
            && (this.getXtLrsj() == null ? other.getXtLrsj() == null : this.getXtLrsj().equals(other.getXtLrsj()))
            && (this.getXtLrrxm() == null ? other.getXtLrrxm() == null : this.getXtLrrxm().equals(other.getXtLrrxm()))
            && (this.getXtLrrid() == null ? other.getXtLrrid() == null : this.getXtLrrid().equals(other.getXtLrrid()))
            && (this.getXtLrrbm() == null ? other.getXtLrrbm() == null : this.getXtLrrbm().equals(other.getXtLrrbm()))
            && (this.getXtLrrbmid() == null ? other.getXtLrrbmid() == null : this.getXtLrrbmid().equals(other.getXtLrrbmid()))
            && (this.getXtLrip() == null ? other.getXtLrip() == null : this.getXtLrip().equals(other.getXtLrip()))
            && (this.getXtZhxgsj() == null ? other.getXtZhxgsj() == null : this.getXtZhxgsj().equals(other.getXtZhxgsj()))
            && (this.getXtZhxgrxm() == null ? other.getXtZhxgrxm() == null : this.getXtZhxgrxm().equals(other.getXtZhxgrxm()))
            && (this.getXtZhxgrid() == null ? other.getXtZhxgrid() == null : this.getXtZhxgrid().equals(other.getXtZhxgrid()))
            && (this.getXtZhxgrbm() == null ? other.getXtZhxgrbm() == null : this.getXtZhxgrbm().equals(other.getXtZhxgrbm()))
            && (this.getXtZhxgrbmid() == null ? other.getXtZhxgrbmid() == null : this.getXtZhxgrbmid().equals(other.getXtZhxgrbmid()))
            && (this.getXtZhxgip() == null ? other.getXtZhxgip() == null : this.getXtZhxgip().equals(other.getXtZhxgip()))
            && (this.getXtZxbz() == null ? other.getXtZxbz() == null : this.getXtZxbz().equals(other.getXtZxbz()))
            && (this.getXtZxyy() == null ? other.getXtZxyy() == null : this.getXtZxyy().equals(other.getXtZxyy()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getRoleName() == null) ? 0 : getRoleName().hashCode());
        result = prime * result + ((getRoleDesc() == null) ? 0 : getRoleDesc().hashCode());
        result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode());
        result = prime * result + ((getBz() == null) ? 0 : getBz().hashCode());
        result = prime * result + ((getXtCjsj() == null) ? 0 : getXtCjsj().hashCode());
        result = prime * result + ((getXtLrsj() == null) ? 0 : getXtLrsj().hashCode());
        result = prime * result + ((getXtLrrxm() == null) ? 0 : getXtLrrxm().hashCode());
        result = prime * result + ((getXtLrrid() == null) ? 0 : getXtLrrid().hashCode());
        result = prime * result + ((getXtLrrbm() == null) ? 0 : getXtLrrbm().hashCode());
        result = prime * result + ((getXtLrrbmid() == null) ? 0 : getXtLrrbmid().hashCode());
        result = prime * result + ((getXtLrip() == null) ? 0 : getXtLrip().hashCode());
        result = prime * result + ((getXtZhxgsj() == null) ? 0 : getXtZhxgsj().hashCode());
        result = prime * result + ((getXtZhxgrxm() == null) ? 0 : getXtZhxgrxm().hashCode());
        result = prime * result + ((getXtZhxgrid() == null) ? 0 : getXtZhxgrid().hashCode());
        result = prime * result + ((getXtZhxgrbm() == null) ? 0 : getXtZhxgrbm().hashCode());
        result = prime * result + ((getXtZhxgrbmid() == null) ? 0 : getXtZhxgrbmid().hashCode());
        result = prime * result + ((getXtZhxgip() == null) ? 0 : getXtZhxgip().hashCode());
        result = prime * result + ((getXtZxbz() == null) ? 0 : getXtZxbz().hashCode());
        result = prime * result + ((getXtZxyy() == null) ? 0 : getXtZxyy().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", roleName=").append(roleName);
        sb.append(", roleDesc=").append(roleDesc);
        sb.append(", orderNo=").append(orderNo);
        sb.append(", bz=").append(bz);
        sb.append(", xtCjsj=").append(xtCjsj);
        sb.append(", xtLrsj=").append(xtLrsj);
        sb.append(", xtLrrxm=").append(xtLrrxm);
        sb.append(", xtLrrid=").append(xtLrrid);
        sb.append(", xtLrrbm=").append(xtLrrbm);
        sb.append(", xtLrrbmid=").append(xtLrrbmid);
        sb.append(", xtLrip=").append(xtLrip);
        sb.append(", xtZhxgsj=").append(xtZhxgsj);
        sb.append(", xtZhxgrxm=").append(xtZhxgrxm);
        sb.append(", xtZhxgrid=").append(xtZhxgrid);
        sb.append(", xtZhxgrbm=").append(xtZhxgrbm);
        sb.append(", xtZhxgrbmid=").append(xtZhxgrbmid);
        sb.append(", xtZhxgip=").append(xtZhxgip);
        sb.append(", xtZxbz=").append(xtZxbz);
        sb.append(", xtZxyy=").append(xtZxyy);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}