Update the User entity to prep for Chat functions

This commit is contained in:
Julia Butenhoff 2022-07-18 10:39:01 -05:00 committed by Julia Butenhoff
parent a16f5ada34
commit 1dae89176d

View File

@ -6,11 +6,14 @@ import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.ArrayList;
@Getter
@Setter
@ -21,15 +24,49 @@ import javax.persistence.Table;
@Table(name = "Users")
public class User {
// User ID
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer UUID;
// Username
private String username;
// Password
private String password;
// Security Question
private String securityQuestion;
// Security Answer
private String securityAnswer;
// If the user is online
private Integer isOnline = 0;
/*
* Chat Status
* 0 - Ready to Party
* 1 - Do Not Disturb
* 2 - Playing
* 3 - Partying
*/
private Integer chatStatus = 0;
/*
* If the user has a phone
* 0 - No Cell Phone
* 1 - Has Cell Phone
*/
private Integer phoneStatus = 0;
// Buddy Lists
@Column(name = "buddyList")
private String rawBuddyList;
@Transient
private ArrayList<User> buddyList;
// Connection ID to send data to from other Users
private String connectionId;
}