package app.playmancala.model; import com.fasterxml.jackson.annotation.JsonProperty; public enum EndReason { @JsonProperty("completed") COMPLETED, @JsonProperty("left") LEFT, @JsonProperty("timeout") TIMEOUT, // Only in games saved before the game clock. @JsonProperty("inactive") INACTIVE; // The value stored in the games.end_reason column. public String wireName() { return name().toLowerCase(); } public static EndReason fromWireName(String value) { return valueOf(value.toUpperCase()); } }