//
//  PublicProvidentModel.swift
//  Product Calculator
//
//  Created by Suraj Kumar Mandal on 06/12/21.
//

import Foundation

// MARK: - PublicProvidentModel
class PublicProvidentModel {
    var depositDate, maturityDate, maturityDisplayDate, depositDisplayDate : String?
    var amountDepositFreq, term : Int?
    var depositAmount, annualInterest, compundFreq, totalAmountDeposited, maturityAmount, totalInterestReceived, annualAmountDeposited, currentBalance : Double?
    var ppfFixedAmountLookupList = [PPFLookupList]()
    
    init(depositDate:String, maturityDate:String, maturityDisplayDate:String, depositDisplayDate:String, amountDepositFreq:Int, term:Int, depositAmount:Double, annualInterest:Double, compundFreq:Double, totalAmountDeposited:Double, maturityAmount:Double, totalInterestReceived:Double, annualAmountDeposited:Double, currentBalance:Double) {
        self.depositDate = depositDate
        self.maturityDate = maturityDate
        self.maturityDisplayDate = maturityDisplayDate
        self.depositDisplayDate = depositDisplayDate
        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.annualAmountDeposited = annualAmountDeposited
        self.currentBalance = currentBalance
    }
}

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