Last active
November 22, 2019 23:41
-
-
Save duanebester/e3d0784a1851ad0efcf8ffc548744374 to your computer and use it in GitHub Desktop.
Coffee Shop case class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package models.responses | |
import spray.json.DefaultJsonProtocol | |
import models.common._ | |
// CoffeeShop.scala | |
case class CoffeeShop(id: Int, name: String, location: Location) extends GeoSearchable | |
object CoffeeShop extends DefaultJsonProtocol { | |
implicit val format = jsonFormat3(CoffeeShop.apply) | |
} | |
case class CoffeeShopsResponse(hits: Seq[CoffeeShop], total: Long) extends SearchResponse[CoffeeShop] | |
object CoffeeShopsResponse extends DefaultJsonProtocol { | |
implicit def format = jsonFormat2(CoffeeShopsResponse.apply) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment