| package com.pt.entity; |
| |
| import jakarta.persistence.Entity; |
| import jakarta.persistence.Id; |
| |
| @Entity |
| public class User { |
| |
| @Id |
| private String uid; |
| |
| private String username; |
| private String password; |
| private String email; |
| private int level; |
| private int points; |
| private long uploaded; |
| private long downloaded; |
| |
| public User() { |
| } |
| public User(String uid, String username, String password, String email, int level) { |
| this.uid = uid; |
| this.username = username; |
| this.password = password; |
| this.email = email; |
| this.level = level; |
| } |
| public String getUid() { |
| return uid; |
| } |
| public void setUid(String uid) { |
| this.uid = uid; |
| } |
| 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; |
| } |
| public String getEmail() { |
| return email; |
| } |
| public void setEmail(String email) { |
| this.email = email; |
| } |
| public int getLevel() { |
| return level; |
| } |
| public void setLevel(int level) { |
| this.level = level; |
| } |
| public int getPoints() { |
| return points; |
| } |
| public void setPoints(int points) { |
| this.points = points; |
| } |
| |
| public long getUploaded() { |
| return uploaded; |
| } |
| |
| public void setUploaded(long uploaded) { |
| this.uploaded = uploaded; |
| } |
| |
| public long getDownloaded() { |
| return downloaded; |
| } |
| |
| public void setDownloaded(long downloaded) { |
| this.downloaded = downloaded; |
| } |
| |
| @Override |
| public String toString() { |
| return "{" + |
| "uid:'" + uid + '\'' + |
| ",\nusername:'" + username + '\'' + |
| ",\npassword:'" + password + '\'' + |
| ",\nemail:'" + email + '\'' + |
| ",\nlevel:" + level + |
| ",\npoints:" + points + |
| ",\nuploaded:" + uploaded + |
| ",\ndownloaded:" + downloaded + |
| '}'; |
| } |
| } |