package com.lyms.talkonlineweb.domain;
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 java.util.Date;
import lombok.Data;
/**
*
* @TableName lyms_message
*/
@TableName(value ="lyms_message")
@Data
public class LymsMessage implements Serializable {
/**
*
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 发送人员
*/
@TableField(value = "fromid")
private String fromid;
/**
* 接受人员
*/
@TableField(value = "targetid")
private String targetid;
/**
* 消息类型
*/
@TableField(value = "mtype")
private String mtype;
/**
* 消息内容
*/
@TableField(value = "content")
private String content;
/**
* 发送时间
*/
@TableField(value = "sendtime")
private Date sendtime;
@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;
}
LymsMessage other = (LymsMessage) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getFromid() == null ? other.getFromid() == null : this.getFromid().equals(other.getFromid()))
&& (this.getTargetid() == null ? other.getTargetid() == null : this.getTargetid().equals(other.getTargetid()))
&& (this.getMtype() == null ? other.getMtype() == null : this.getMtype().equals(other.getMtype()))
&& (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
&& (this.getSendtime() == null ? other.getSendtime() == null : this.getSendtime().equals(other.getSendtime()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getFromid() == null) ? 0 : getFromid().hashCode());
result = prime * result + ((getTargetid() == null) ? 0 : getTargetid().hashCode());
result = prime * result + ((getMtype() == null) ? 0 : getMtype().hashCode());
result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
result = prime * result + ((getSendtime() == null) ? 0 : getSendtime().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(", fromid=").append(fromid);
sb.append(", targetid=").append(targetid);
sb.append(", mtype=").append(mtype);
sb.append(", content=").append(content);
sb.append(", sendtime=").append(sendtime);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}