From 5ce75f83c38ad19153c8a7d0724160bd0b3222d8 Mon Sep 17 00:00:00 2001 From: p2lpmrue4 <3218311473@qq.com> Date: Fri, 28 Jun 2024 16:04:04 +0800 Subject: [PATCH] =?UTF-8?q?Add=20=E5=95=86=E5=93=81=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 商品分类 | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 商品分类 diff --git a/商品分类 b/商品分类 new file mode 100644 index 0000000..fbf7c0b --- /dev/null +++ b/商品分类 @@ -0,0 +1,96 @@ +package priv.jesse.mall.entity; + + +import javax.persistence.*; +import java.io.Serializable; + +/** + * 管理员用户 + */ +@Entity +public class AdminUser implements Serializable { + private static final long serialVersionUID = 1L; + @Id + @GeneratedValue + @Column + private Integer id; + @Column(nullable = false) + private String username; + @Column + private String password; + + public AdminUser(Integer id, String username, String password) { + this.id = id; + this.username = username; + this.password = password; + } + + public AdminUser() { + super(); + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username == null ? null : username.trim(); + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password == null ? null : password.trim(); + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + AdminUser other = (AdminUser) 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())); + } + + @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()); + 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(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file