Skip to content

Instantly share code, notes, and snippets.

@jchapuis
Created September 18, 2019 18:39
Show Gist options
  • Save jchapuis/4a2c2d511bd3a99a1894361220cfeda8 to your computer and use it in GitHub Desktop.
Save jchapuis/4a2c2d511bd3a99a1894361220cfeda8 to your computer and use it in GitHub Desktop.
case class Ride(id: Ride.ID,
origin: Address,
destination: Address,
pickupTime: Instant,
vehicle: Option[Vehicle.ID],
status: Ride.Status)
object Ride {
sealed trait Status
case object Pending extends Status
case object Assigned extends Status
case object Started extends Status
case object Completed extends Status
type ID = UUID
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment