Types and CoProducts in scala code example
Example: Types and CoProducts in scala
sealed trait Request
case class CreateUser(name: String) extends Request
case class ReadUserInfo(userId: Int) extends Request
case class UpdateUserInfo(userId: Int, name: String) extends Request
case class DeleteUser(userId: Int) extends Request