package com.ydtech.modules.admin.model; import java.io.Serializable; import java.util.Date; 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 lombok.Data; /** * 用户角色 * * @TableName sys_user_role */ @TableName(value = "sys_user_role") @Data public class SysUserRole implements Serializable { /** * 编号 */ @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 用户ID */ @TableField(value = "user_id") private String userId; /** * 角色ID */ @TableField(value = "role_id") private Long roleId; /** * 创建人 */ @TableField(value = "create_by") private String createBy; /** * 创建时间 */ @TableField(value = "create_time") private Date createTime; /** * 更新人 */ @TableField(value = "last_update_by") private String lastUpdateBy; /** * 更新时间 */ @TableField(value = "last_update_time") private Date lastUpdateTime; @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; } SysUserRole other = (SysUserRole) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) && (this.getRoleId() == null ? other.getRoleId() == null : this.getRoleId().equals(other.getRoleId())) && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getLastUpdateBy() == null ? other.getLastUpdateBy() == null : this.getLastUpdateBy().equals(other.getLastUpdateBy())) && (this.getLastUpdateTime() == null ? other.getLastUpdateTime() == null : this.getLastUpdateTime().equals(other.getLastUpdateTime())); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); result = prime * result + ((getRoleId() == null) ? 0 : getRoleId().hashCode()); result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getLastUpdateBy() == null) ? 0 : getLastUpdateBy().hashCode()); result = prime * result + ((getLastUpdateTime() == null) ? 0 : getLastUpdateTime().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(", userId=").append(userId); sb.append(", roleId=").append(roleId); sb.append(", createBy=").append(createBy); sb.append(", createTime=").append(createTime); sb.append(", lastUpdateBy=").append(lastUpdateBy); sb.append(", lastUpdateTime=").append(lastUpdateTime); sb.append(", serialVersionUID=").append(serialVersionUID); sb.append("]"); return sb.toString(); } }