I have Customer object and Loan object. It is a one-to-many relationship (Customer <-->> Loan). Each loan has exactly 5 type of Payoff plans (exactly 5 and will not change for the next 100 years) for customer to select and to see the payment projection. Each Payoff plan consist of type, initial-payment, monthly-payment, interest, number-installments, total-payment, total-interest and payoff-date. What's the best way to model the Payoff object?
Option 1:
Each Loan has five relationship to Payoff object representing the five different payoff plan. i.e. inside Loan object, there are 5 relationships payoffPlanA, payoffPlanB, payoffPlanC, payoffPlanD, payoffPlanE to Payoff object.
Option 2:
Each loan has a one-to-many relationship (Loan <-->> Payoff). To obtain a particular Payoff plan, the app will check from the list of Payoff objects for the type attribute of Payoff object. For example, for the app to display the content of Payoff Plan C, the app will need to traverse the list of Payoff objects for the loan and check if the type is Plan C, then retrieve the details.
Are there other options? Thanks