package app.playmancala.model; import com.fasterxml.jackson.annotation.JsonProperty; public enum GameResult { @JsonProperty("player1") PLAYER1, @JsonProperty("player2") PLAYER2, @JsonProperty("draw") DRAW; // The value stored in the games.result column. public String wireName() { return name().toLowerCase(); } public static GameResult fromWireName(String value) { return value == null ? null : valueOf(value.toUpperCase()); } }