case class And(contract1: Contract, contract2: Contract) extends Contract case class When(date: LocalDate, contract: Contract) extends Contract