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 typeId;
|
|
/**
|
* 名字
|
*/
|
private String typeName;
|
|
/**
|
* 0-未删除 1-删除
|
*/
|
private Integer delFlag;
|
|
@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.getTypeId() == null ? other.getTypeId() == null : this.getTypeId().equals(other.getTypeId()))
|
&& (this.getTypeName() == null ? other.getTypeName() == null : this.getTypeName().equals(other.getTypeName()))
|
&& (this.getDelFlag() == null ? other.getDelFlag() == null : this.getDelFlag().equals(other.getDelFlag()));
|
}
|
|
@Override
|
public int hashCode() {
|
final int prime = 31;
|
int result = 1;
|
result = prime * result + ((getTypeId() == null) ? 0 : getTypeId().hashCode());
|
result = prime * result + ((getTypeName() == null) ? 0 : getTypeName().hashCode());
|
result = prime * result + ((getDelFlag() == null) ? 0 : getDelFlag().hashCode());
|
return result;
|
}
|
|
@Override
|
public String toString() {
|
StringBuilder sb = new StringBuilder();
|
sb.append(getClass().getSimpleName());
|
sb.append(" [");
|
sb.append("Hash = ").append(hashCode());
|
sb.append(", typeId=").append(typeId);
|
sb.append(", typeName=").append(typeName);
|
sb.append(", delFlag=").append(delFlag);
|
sb.append(", serialVersionUID=").append(serialVersionUID);
|
sb.append("]");
|
return sb.toString();
|
}
|
}
|