//
//  PORecurringDepositModel.swift
//  Product Calculator
//
//  Created by Suraj Kumar Mandal on 03/12/21.
//

import Foundation

// MARK: - PORecurringDepositModel
class PORecurringDepositModel {
    var depositDate, maturityDate : String?
    var amountDepositFreq, term : Int?
    var depositAmount, annualInterest, compundFreq, totalAmountDeposited, maturityAmount, totalInterestReceived, interestRate : Double?
    var poRecurringLookupList = [PORecurringLookupList]()
    
    init(depositDate:String, maturityDate:String, amountDepositFreq:Int, term:Int, depositAmount:Double, annualInterest:Double, compundFreq:Double, totalAmountDeposited:Double, maturityAmount:Double, totalInterestReceived:Double, interestRate:Double) {
        self.depositDate = depositDate
        self.maturityDate = maturityDate
        self.amountDepositFreq = amountDepositFreq
        self.term = term
        self.depositAmount = depositAmount
        self.annualInterest = annualInterest
        self.compundFreq = compundFreq
        self.totalAmountDeposited = totalAmountDeposited
        self.maturityAmount = maturityAmount
        self.totalInterestReceived = totalInterestReceived
        self.interestRate = interestRate
    }
}


class PORecurringLookupList {
    let serialNo, daysToMaturity : Int?
    let referenceDate, referenceMonth, financialYear : String?
    let openingBal, amountDeposited, interestAccrued, interestCredited, totalInterestAccrued, closingBalance : Double?
    
    init(serialNo:Int, daysToMaturity:Int, referenceDate:String, referenceMonth:String, financialYear:String, openingBal:Double, amountDeposited:Double, interestAccrued:Double, interestCredited:Double, totalInterestAccrued:Double, closingBalance:Double) {
        self.serialNo = serialNo
        self.daysToMaturity = daysToMaturity
        self.referenceDate = referenceDate
        self.referenceMonth = referenceMonth
        self.financialYear = financialYear
        self.openingBal = openingBal
        self.amountDeposited = amountDeposited
        self.interestAccrued = interestAccrued
        self.interestCredited = interestCredited
        self.totalInterestAccrued = totalInterestAccrued
        self.closingBalance = closingBalance
    }
}
