//
//  BondDebenturesModel.swift
//  Product Calculator
//
//  Created by Suraj Kumar Mandal on 30/11/21.
//

import Foundation

// MARK: - BondDebenturesModel
class BondDebenturesModel {
    var serialNo, numberOfBondsPurchased, term, coupounPayoutFrequency, tenureYearsDays, totalMonths : Int?
    var referenceDate, referenceMonth, financialYear, daysToMaturity, viewMaturityDate, investmentDate : String?
    var amountDeposited, couponReceived, totalCouponReceived, bondFaceValue, effectiveTimeToMaturity, interestCouponRate, currentYield, currentValue : Double?
    
    init(serialNo:Int, numberOfBondsPurchased:Int, term:Int, coupounPayoutFrequency:Int, tenureYearsDays:Int, totalMonths:Int, referenceDate:String, referenceMonth:String, financialYear:String, daysToMaturity:String, viewMaturityDate:String, investmentDate:String, amountDeposited:Double, couponReceived:Double, totalCouponReceived:Double, bondFaceValue:Double, effectiveTimeToMaturity:Double, interestCouponRate:Double, currentYield:Double, currentValue:Double) {
        self.serialNo = serialNo
        self.numberOfBondsPurchased = numberOfBondsPurchased
        self.term = term
        self.coupounPayoutFrequency = coupounPayoutFrequency
        self.tenureYearsDays = tenureYearsDays
        self.totalMonths = totalMonths
        self.referenceDate = referenceDate
        self.referenceMonth = referenceMonth
        self.financialYear = financialYear
        self.daysToMaturity = daysToMaturity
        self.viewMaturityDate = viewMaturityDate
        self.investmentDate = investmentDate
        self.amountDeposited = amountDeposited
        self.couponReceived = couponReceived
        self.totalCouponReceived = totalCouponReceived
        self.bondFaceValue = bondFaceValue
        self.effectiveTimeToMaturity = effectiveTimeToMaturity
        self.interestCouponRate = interestCouponRate
        self.currentYield = currentYield
        self.currentValue = currentValue
    }
}

// MARK: - BondDebenturesOutputListModel
class BondDebenturesOutputListModel {
    var serialNo, daysToMaturity : Int?
    var referenceDate, referenceMonth, financialYear : String?
    var bondAmountDeposited, couponReceived, totalCouponReceived : Double?
    
    init(serialNo:Int, daysToMaturity:Int, referenceDate:String, referenceMonth:String, financialYear:String, bondAmountDeposited:Double, couponReceived:Double, totalCouponReceived:Double) {
        self.serialNo = serialNo
        self.daysToMaturity = daysToMaturity
        self.referenceDate = referenceDate
        self.referenceMonth = referenceMonth
        self.financialYear = financialYear
        self.bondAmountDeposited = bondAmountDeposited
        self.couponReceived = couponReceived
        self.totalCouponReceived = totalCouponReceived
    }
}
