2024-07-07 07:09:10 +00:00
|
|
|
|
package com.example.takeawaysystemserver.entity;
|
|
|
|
|
|
2024-07-11 09:19:14 +00:00
|
|
|
|
import java.io.Serializable;
|
2024-07-07 07:09:10 +00:00
|
|
|
|
import lombok.Data;
|
|
|
|
|
|
|
|
|
|
/**
|
2024-07-11 09:19:14 +00:00
|
|
|
|
*
|
|
|
|
|
* @TableName user
|
2024-07-07 07:09:10 +00:00
|
|
|
|
*/
|
|
|
|
|
@Data
|
2024-07-11 09:19:14 +00:00
|
|
|
|
public class User implements Serializable {
|
|
|
|
|
/**
|
|
|
|
|
* 主键ID
|
|
|
|
|
*/
|
2024-07-10 03:17:34 +00:00
|
|
|
|
private String id;
|
2024-07-11 09:19:14 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 用户名
|
|
|
|
|
*/
|
2024-07-10 03:17:34 +00:00
|
|
|
|
private String username;
|
2024-07-11 09:19:14 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 密码
|
|
|
|
|
*/
|
2024-07-10 03:17:34 +00:00
|
|
|
|
private String password;
|
2024-07-11 09:19:14 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 手机号
|
|
|
|
|
*/
|
2024-07-10 03:17:34 +00:00
|
|
|
|
private String phone;
|
2024-07-11 09:19:14 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 地址
|
|
|
|
|
*/
|
2024-07-10 03:17:34 +00:00
|
|
|
|
private String address;
|
2024-07-11 09:19:14 +00:00
|
|
|
|
|
2024-07-10 03:17:34 +00:00
|
|
|
|
/**
|
2024-07-11 09:19:14 +00:00
|
|
|
|
* 用户状态,0:被删除,1:正常,2:被封禁
|
2024-07-10 03:17:34 +00:00
|
|
|
|
*/
|
|
|
|
|
private Integer status;
|
2024-07-11 09:19:14 +00:00
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
User other = (User) that;
|
|
|
|
|
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
|
|
|
|
&& (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
|
|
|
|
|
&& (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
|
|
|
|
|
&& (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
|
|
|
|
|
&& (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
|
|
|
|
|
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public int hashCode() {
|
|
|
|
|
final int prime = 31;
|
|
|
|
|
int result = 1;
|
|
|
|
|
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
|
|
|
|
result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
|
|
|
|
|
result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
|
|
|
|
|
result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
|
|
|
|
|
result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
|
|
|
|
|
result = prime * result + ((getStatus() == null) ? 0 : getStatus().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(", username=").append(username);
|
|
|
|
|
sb.append(", password=").append(password);
|
|
|
|
|
sb.append(", phone=").append(phone);
|
|
|
|
|
sb.append(", address=").append(address);
|
|
|
|
|
sb.append(", status=").append(status);
|
|
|
|
|
sb.append(", serialVersionUID=").append(serialVersionUID);
|
|
|
|
|
sb.append("]");
|
|
|
|
|
return sb.toString();
|
|
|
|
|
}
|
|
|
|
|
}
|