package models.elections

import java.net.URI

import models.JsonUtils
import play.api.libs.json.Json

case class CandidateResults(
  name: String,
  states: List[String],
  electoralVotes: Int,
  popularVotes: Int,
  avatar: URI
)

object CandidateResults {
  import JsonUtils._
  implicit val jf = Json.format[CandidateResults]
}

case class ElectionResults(candidates: List[CandidateResults])

object ElectionResults {
  implicit val jf = Json.format[ElectionResults]
}

package models.elections

import java.net.URI

import models.JsonUtils
import play.api.libs.json.Json

case class CandidateResults(
  name: String,
  states: List[String],
  electoralVotes: Int,
  popularVotes: Int,
  avatar: URI,
  colour: String
)

object CandidateResults {
  import JsonUtils._
  implicit val jf = Json.format[CandidateResults]
}

case class ElectionResults(candidates: List[CandidateResults])

object ElectionResults {
  implicit val jf = Json.format[ElectionResults]
}

Add candidate colour field for election notifications
Add candidate colour field for election notifications
