package com.linghu.model.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 java.io.Serializable; import lombok.Data; /** * * @TableName type */ @TableName(value ="type") @Data public class Type implements Serializable { /** * 类型 */ @TableId(type = IdType.AUTO) private Integer type_id; /** * 名字 */ private String type_name; @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; } Type other = (Type) that; return (this.getType_id() == null ? other.getType_id() == null : this.getType_id().equals(other.getType_id())) && (this.getType_name() == null ? other.getType_name() == null : this.getType_name().equals(other.getType_name())); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getType_id() == null) ? 0 : getType_id().hashCode()); result = prime * result + ((getType_name() == null) ? 0 : getType_name().hashCode()); return result; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", type_id=").append(type_id); sb.append(", type_name=").append(type_name); sb.append(", serialVersionUID=").append(serialVersionUID); sb.append("]"); return sb.toString(); } }