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;
import javax.validation.constraints.NotNull;
/**
* 用户
* @TableName lyms_user
*/
@TableName(value ="lyms_user")
@Data
public class LymsUser implements Serializable {
/**
* 用户标识
*/
@TableId(value = "uid", type = IdType.AUTO)
private Integer uid;
/**
* 姓名
*/
@NotNull(message = "姓名不能为空")
@TableField(value = "uname")
private String uname;
/**
* 登录账号
*/
@NotNull(message = "登录账号不能为空")
@TableField(value = "login")
private String login;
/**
* 登录密码
*/
@TableField(value = "passwd")
private String passwd;
/**
* 环信id
*/
@TableField(value = "hxid")
private String hxid;
/**
* 头像图片URL
*/
@TableField(value = "headimg")
private String headimg;
// 医院ID
@TableField(value = "hid")
private int hid;
// 医院名称
@TableField(value = "hname")
private String hname;
// 科室ID
@TableField(value = "did")
private int did;
// 科室名称
@TableField(value = "dname")
private String dname;
/**
* 创建人
*/
@TableField(value = "createdby")
private Integer createdby;
/**
* 创建时间
*/
@TableField(value = "createdtime")
private Date createdtime;
/**
* 更新人
*/
@TableField(value = "updatedby")
private Integer updatedby;
/**
* 更新时间
*/
@TableField(value = "updated_time",update = "now()")
private Date updatedTime;
@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;
}
LymsUser other = (LymsUser) that;
return (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid()))
&& (this.getUname() == null ? other.getUname() == null : this.getUname().equals(other.getUname()))
&& (this.getLogin() == null ? other.getLogin() == null : this.getLogin().equals(other.getLogin()))
&& (this.getPasswd() == null ? other.getPasswd() == null : this.getPasswd().equals(other.getPasswd()))
&& (this.getHxid() == null ? other.getHxid() == null : this.getHxid().equals(other.getHxid()))
&& (this.getCreatedby() == null ? other.getCreatedby() == null : this.getCreatedby().equals(other.getCreatedby()))
&& (this.getCreatedtime() == null ? other.getCreatedtime() == null : this.getCreatedtime().equals(other.getCreatedtime()))
&& (this.getUpdatedby() == null ? other.getUpdatedby() == null : this.getUpdatedby().equals(other.getUpdatedby()))
&& (this.getUpdatedTime() == null ? other.getUpdatedTime() == null : this.getUpdatedTime().equals(other.getUpdatedTime()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode());
result = prime * result + ((getUname() == null) ? 0 : getUname().hashCode());
result = prime * result + ((getLogin() == null) ? 0 : getLogin().hashCode());
result = prime * result + ((getPasswd() == null) ? 0 : getPasswd().hashCode());
result = prime * result + ((getHxid() == null) ? 0 : getHxid().hashCode());
result = prime * result + ((getCreatedby() == null) ? 0 : getCreatedby().hashCode());
result = prime * result + ((getCreatedtime() == null) ? 0 : getCreatedtime().hashCode());
result = prime * result + ((getUpdatedby() == null) ? 0 : getUpdatedby().hashCode());
result = prime * result + ((getUpdatedTime() == null) ? 0 : getUpdatedTime().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", uid=").append(uid);
sb.append(", uname=").append(uname);
sb.append(", login=").append(login);
sb.append(", passwd=").append(passwd);
sb.append(", hxid=").append(hxid);
sb.append(", createdby=").append(createdby);
sb.append(", createdtime=").append(createdtime);
sb.append(", updatedby=").append(updatedby);
sb.append(", updatedTime=").append(updatedTime);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}