// Path: osuCelebrity-model/src/main/java/me/reddev/osucelebrity/osu/OsuUser.java
// @PersistenceCapable(detachable = "true")
// @Getter
// @ToString
// public class OsuUser {
//   @PrimaryKey
//   @UserId
//   @Getter(onMethod = @__(@UserId))
//   private int userId;
// 
//   @Index
//   private String userName;
// 
//   private long downloaded;
// 
//   @Setter
//   private Privilege privilege = Privilege.PLAYER;
// 
//   @Setter
//   @Column(defaultValue = "true")
//   private boolean allowsNotifications = true;
//   
//   @Setter
//   @Column(defaultValue = "true")
//   @Index
//   private boolean allowsSpectating = true;
//   
//   @Setter(onParam = @__(@GameMode))
//   @Getter(onMethod = @__(@GameMode))
//   @Column(defaultValue = "0")
//   @GameMode
//   private int gameMode = 0;
// 
//   @Setter
//   @Column(defaultValue = "-1")
//   private long timeOutUntil = -1;
// 
//   /**
//    * Creates a new user object copying all relevant data from the api user object.
//    * 
//    * @param user downloaded data.
//    * @param downloaded current time in millis.
//    */
//   public OsuUser(OsuApiUser user, long downloaded) {
//     this.userId = user.getUserId();
//     update(user, downloaded);
//   }
// 
//   /**
//    * updates this object with the downloaded data.
//    * 
//    * @param user downloaded data
//    * @param downloaded current time
//    */
//   public void update(OsuApiUser user, long downloaded) {
//     this.setUserName(user.getUserName());
//     this.setDownloaded(downloaded);
//   }
// 
//   @Override
//   public boolean equals(Object obj) {
//     if (obj instanceof OsuUser) {
//       return ((OsuUser) obj).userId == userId;
//     }
//     return false;
//   }
// 
//   @Override
//   public int hashCode() {
//     return userId;
//   }
// 
//   void setDownloaded(long downloaded) {
//     this.downloaded = downloaded;
//   }
// 
//   void setUserName(String userName) {
//     this.userName = userName;
//   }
// }


import lombok.Data;
import me.reddev.osucelebrity.osu.OsuUser;
import javax.jdo.annotations.Column;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.Index;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
package me.reddev.osucelebrity.core;



/**
 * A user who is in the spectating queue.
 * 
 * @author Redback
 */
@Data
@PersistenceCapable
public class QueuedPlayer {
  public static final int CANCELLED = -2;
  public static final int DONE = -1;
  public static final int SPECTATING = 0;
  public static final int NEXT = 1;
  public static final int QUEUED = 2;

  @PrimaryKey
  @Persistent(valueStrategy = IdGeneratorStrategy.INCREMENT)
  long id;

// Path: osuCelebrity-model/src/main/java/me/reddev/osucelebrity/osu/OsuUser.java
// @PersistenceCapable(detachable = "true")
// @Getter
// @ToString
// public class OsuUser {
//   @PrimaryKey
//   @UserId
//   @Getter(onMethod = @__(@UserId))
//   private int userId;
// 
//   @Index
//   private String userName;
// 
//   private long downloaded;
// 
//   @Setter
//   private Privilege privilege = Privilege.PLAYER;
// 
//   @Setter
//   @Column(defaultValue = "true")
//   private boolean allowsNotifications = true;
//   
//   @Setter
//   @Column(defaultValue = "true")
//   @Index
//   private boolean allowsSpectating = true;
//   
//   @Setter(onParam = @__(@GameMode))
//   @Getter(onMethod = @__(@GameMode))
//   @Column(defaultValue = "0")
//   @GameMode
//   private int gameMode = 0;
// 
//   @Setter
//   @Column(defaultValue = "-1")
//   private long timeOutUntil = -1;
// 
//   /**
//    * Creates a new user object copying all relevant data from the api user object.
//    * 
//    * @param user downloaded data.
//    * @param downloaded current time in millis.
//    */
//   public OsuUser(OsuApiUser user, long downloaded) {
//     this.userId = user.getUserId();
//     update(user, downloaded);
//   }
// 
//   /**
//    * updates this object with the downloaded data.
//    * 
//    * @param user downloaded data
//    * @param downloaded current time
//    */
//   public void update(OsuApiUser user, long downloaded) {
//     this.setUserName(user.getUserName());
//     this.setDownloaded(downloaded);
//   }
// 
//   @Override
//   public boolean equals(Object obj) {
//     if (obj instanceof OsuUser) {
//       return ((OsuUser) obj).userId == userId;
//     }
//     return false;
//   }
// 
//   @Override
//   public int hashCode() {
//     return userId;
//   }
// 
//   void setDownloaded(long downloaded) {
//     this.downloaded = downloaded;
//   }
// 
//   void setUserName(String userName) {
//     this.userName = userName;
//   }
// }


// Path: osuCelebrity-model/src/main/java/me/reddev/osucelebrity/core/QueuedPlayer.java
import lombok.Data;
import me.reddev.osucelebrity.osu.OsuUser;
import javax.jdo.annotations.Column;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.Index;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

package me.reddev.osucelebrity.core;



/**
 * A user who is in the spectating queue.
 * 
 * @author Redback
 */
@Data
@PersistenceCapable
public class QueuedPlayer {
  public static final int CANCELLED = -2;
  public static final int DONE = -1;
  public static final int SPECTATING = 0;
  public static final int NEXT = 1;
  public static final int QUEUED = 2;

  @PrimaryKey
  @Persistent(valueStrategy = IdGeneratorStrategy.INCREMENT)
  long id;

  OsuUser player;