//
//  EMILoanOriginalModel.swift
//  Product Calculator
//
//  Created by Suraj Kumar Mandal on 02/12/21.
//

import Foundation

// MARK: - EMILoanOriginalModel
class EMILoanOriginalModel {
    var depositDate, maturityDate : String?
    var term : Int?
    var depositAmount, annualInterest, compundFreq, maturityAmount, interestReceived, totalInterestReceived : Double?
    var bankCpCdLookupList = [CpCdLookupList]()
    
    init(depositDate:String, maturityDate:String, term:Int, depositAmount:Double, annualInterest:Double, compundFreq:Double, maturityAmount:Double, totalInterestReceived:Double, interestReceived:Double) {
        self.depositDate = depositDate
        self.maturityDate = maturityDate
        self.term = term
        self.depositAmount = depositAmount
        self.annualInterest = annualInterest
        self.compundFreq = compundFreq
        self.maturityAmount = maturityAmount
        self.totalInterestReceived = totalInterestReceived
        self.interestReceived = interestReceived
    }
}


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