Let's take a simple example that models an employee along with the salaries accrued in a year. Here's the domain model in Scala:
case class Salary(empId: String, month: Int, amount: BigDecimal)
case class Employee(id: String, name: String, salaries: List[Salary])