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

import Foundation

// MARK: - EMILoanOriginalModel
class EMILoanOriginalModel {
    var loanCategoryLabel, loanDiscription, loanProvider, loanTypeLabel, loanStartDate, loanEndDate, loan_original_flag, displayDate : String?
    var loanCategory, loanType, loanTenure, numberOfEMI, interestPaymentFrequency : Int?
    var loanAmount, interestRate, emiAmount, totalInterestPaid : Double?

    init(loanCategoryLabel:String, loanDiscription:String, loanProvider:String, loanTypeLabel:String, loanStartDate:String, loanEndDate:String, loan_original_flag:String, displayDate:String, loanCategory:Int, loanType:Int, loanTenure:Int, numberOfEMI:Int, interestPaymentFrequency:Int, loanAmount:Double, interestRate:Double, emiAmount:Double, totalInterestPaid:Double) {
        self.loanCategoryLabel = loanCategoryLabel
        self.loanDiscription = loanDiscription
        self.loanProvider = loanProvider
        self.loanTypeLabel = loanTypeLabel
        self.loanStartDate = loanStartDate
        self.loanEndDate = loanEndDate
        self.loan_original_flag = loan_original_flag
        self.displayDate = displayDate
        self.loanCategory = loanCategory
        self.loanType = loanType
        self.loanTenure = loanTenure
        self.numberOfEMI = numberOfEMI
        self.interestPaymentFrequency = interestPaymentFrequency
        self.loanAmount = loanAmount
        self.interestRate = interestRate
        self.emiAmount = emiAmount
        self.totalInterestPaid = totalInterestPaid
    }
}


class EMIOriginalLookupList {
    let serialNumber, installmentNumber, loanEndDays : Int?
    let refDate, financialYear, referenceMonth, displayDate : String?
    let begningBal, interestPayment, principalPayment, endingBalance, emiAmount, totalPrincipalPaid, totalInterestPaid : Double?

    init(serialNumber:Int, installmentNumber:Int, loanEndDays:Int, refDate:String, financialYear:String, referenceMonth:String, displayDate:String, begningBal:Double, interestPayment:Double, principalPayment:Double, endingBalance:Double, emiAmount:Double, totalPrincipalPaid:Double, totalInterestPaid:Double) {
        self.serialNumber = serialNumber
        self.installmentNumber = installmentNumber
        self.loanEndDays = loanEndDays
        self.refDate = refDate
        self.financialYear = financialYear
        self.referenceMonth = referenceMonth
        self.displayDate = displayDate
        self.begningBal = begningBal
        self.interestPayment = interestPayment
        self.principalPayment = principalPayment
        self.endingBalance = endingBalance
        self.emiAmount = emiAmount
        self.totalPrincipalPaid = totalPrincipalPaid
        self.totalInterestPaid = totalInterestPaid
    }
}

// MARK: - EMILoanOutstandingModel
class EMILoanOutstandingModel {
    var loanCategoryLabel, loanDiscription, loanProvider, loanTypeLabel, loanStartDate, loanEndDate, loan_original_flag, displayDate : String?
    var loanCategory, loanType, loanTenure, numberOfEMI, interestPaymentFrequency : Int?
    var loanAmount, interestRate, emiAmount, totalInterestPaid : Double?

    init(loanCategoryLabel:String, loanDiscription:String, loanProvider:String, loanTypeLabel:String, loanStartDate:String, loanEndDate:String, loan_original_flag:String, displayDate:String, loanCategory:Int, loanType:Int, loanTenure:Int, numberOfEMI:Int, interestPaymentFrequency:Int, loanAmount:Double, interestRate:Double, emiAmount:Double, totalInterestPaid:Double) {
        self.loanCategoryLabel = loanCategoryLabel
        self.loanDiscription = loanDiscription
        self.loanProvider = loanProvider
        self.loanTypeLabel = loanTypeLabel
        self.loanStartDate = loanStartDate
        self.loanEndDate = loanEndDate
        self.loan_original_flag = loan_original_flag
        self.displayDate = displayDate
        self.loanCategory = loanCategory
        self.loanType = loanType
        self.loanTenure = loanTenure
        self.numberOfEMI = numberOfEMI
        self.interestPaymentFrequency = interestPaymentFrequency
        self.loanAmount = loanAmount
        self.interestRate = interestRate
        self.emiAmount = emiAmount
        self.totalInterestPaid = totalInterestPaid
    }
}

class EMIOutstandingLookupList {
    let serialNumber, installmentNumber, loanEndDays : Int?
    let refDate, financialYear, referenceMonth, displayDate : String?
    let begningBal, interestPayment, principalPayment, endingBalance, emiAmount, totalPrincipalPaid, totalInterestPaid : Double?

    init(serialNumber:Int, installmentNumber:Int, loanEndDays:Int, refDate:String, financialYear:String, referenceMonth:String, displayDate:String, begningBal:Double, interestPayment:Double, principalPayment:Double, endingBalance:Double, emiAmount:Double, totalPrincipalPaid:Double, totalInterestPaid:Double) {
        self.serialNumber = serialNumber
        self.installmentNumber = installmentNumber
        self.loanEndDays = loanEndDays
        self.refDate = refDate
        self.financialYear = financialYear
        self.referenceMonth = referenceMonth
        self.displayDate = displayDate
        self.begningBal = begningBal
        self.interestPayment = interestPayment
        self.principalPayment = principalPayment
        self.endingBalance = endingBalance
        self.emiAmount = emiAmount
        self.totalPrincipalPaid = totalPrincipalPaid
        self.totalInterestPaid = totalInterestPaid
    }
}
