//
//  POTimeDepositModel.swift
//  Product Calculator
//
//  Created by Suraj Kumar Mandal on 04/12/21.
//

import Foundation

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


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