APIv3/src/main/java/net/frozenorb/apiv3/model/Rank.java

33 lines
918 B
Java
Raw Normal View History

2016-03-21 23:28:17 +01:00
package net.frozenorb.apiv3.model;
import lombok.Getter;
import net.frozenorb.apiv3.APIv3;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Id;
@Entity(value = "ranks", noClassnameStored = true)
public final class Rank {
@Getter @Id private String id;
@Getter private int weight;
@Getter private String displayName;
@Getter private String gameColor;
@Getter private String websiteColor;
@Getter private boolean staff;
public Rank() {} // For Morphia
public Rank(String id, int weight, String displayName, String gameColor, String websiteColor, boolean staff) {
this.id = id;
this.weight = weight;
this.displayName = displayName;
this.gameColor = gameColor;
this.websiteColor = websiteColor;
this.staff = staff;
}
public void delete() {
APIv3.getDatastore().delete(this);
}
}