From 80d6d3e7fd39d33490fa3943ae468a1e6980e629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joe=20Ku=CC=88ng?= Date: Thu, 4 May 2023 15:50:52 +0200 Subject: [PATCH] user entity --- .../ch/progetto152/entity/UserEntity.java | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/main/java/ch/progetto152/entity/UserEntity.java b/src/main/java/ch/progetto152/entity/UserEntity.java index f88d901..2ca166a 100644 --- a/src/main/java/ch/progetto152/entity/UserEntity.java +++ b/src/main/java/ch/progetto152/entity/UserEntity.java @@ -26,6 +26,9 @@ public class UserEntity { @Basic @Column(name = "password") private String password; + @Basic + @Column(name = "admin") + private Byte admin; public UserEntity(String name, String username, String password) { this.name = name; @@ -33,6 +36,30 @@ public class UserEntity { this.password = password; } + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -49,4 +76,12 @@ public class UserEntity { public int hashCode() { return Objects.hash(id, name, username, password); } + + public Byte getAdmin() { + return admin; + } + + public void setAdmin(Byte admin) { + this.admin = admin; + } }