import { CompetencytypeModel, MyCompetencytypeModel } from "./competencytype.model"
import { MyStatusCodeModel, StatusCodeModel } from "./status-code.model"

export interface AppraisalFormModel {
    plId: string
    companyId: string
    lineNo: number
    competencyType: CompetencytypeModel
    masfromStatusType: StatusCodeModel
    currentStep: string
    lastStep: string
    apsassessyStatus: string
    apsapprove1Status: string
    apsapprove2Status: string
    apsapprove3Status: string
    apsapprove4Status: string
    apsapprove5Status: string
    numberCheck1: number
    numberCheck2: number
    numberCheck3: number
    numberCheck4: number
    numberCheck5: number
    weightedTotal: number
    averageScore: number
    apsassessyComment: string
    apsapprove1Comment: string
    apsapprove2Comment: string
    apsapprove3Comment: string
    apsapprove4Comment: string
    apsapprove5Comment: string
    apsassessyDate: string
    apsapprove1Date: string
    apsapprove2Date: string
    apsapprove3Date: string
    apsapprove4Date: string
    apsapprove5Date: string
    evaluationResults: string
    sumEvaluationResults: string
}
export class MyAppraisalFormModel implements AppraisalFormModel {
    plId: string
    companyId: string
    lineNo: number
    competencyType: CompetencytypeModel
    masfromStatusType: StatusCodeModel
    currentStep: string
    lastStep: string
    apsassessyStatus: string
    apsapprove1Status: string
    apsapprove2Status: string
    apsapprove3Status: string
    apsapprove4Status: string
    apsapprove5Status: string
    numberCheck1: number
    numberCheck2: number
    numberCheck3: number
    numberCheck4: number
    numberCheck5: number
    weightedTotal: number
    averageScore: number
    apsassessyComment: string
    apsapprove1Comment: string
    apsapprove2Comment: string
    apsapprove3Comment: string
    apsapprove4Comment: string
    apsapprove5Comment: string
    apsassessyDate: string
    apsapprove1Date: string
    apsapprove2Date: string
    apsapprove3Date: string
    apsapprove4Date: string
    apsapprove5Date: string
    evaluationResults: string
    sumEvaluationResults: string
    constructor(data?: Partial<AppraisalFormModel>) {
        this.plId = data?.plId || ""
        this.companyId = data?.companyId || ""
        this.lineNo = data?.lineNo ?? 0
        this.competencyType = new MyCompetencytypeModel(data?.competencyType)
        this.masfromStatusType = new MyStatusCodeModel(data?.masfromStatusType)
        this.currentStep = data?.currentStep || ""
        this.lastStep = data?.lastStep || ""
        this.apsassessyStatus = data?.apsassessyStatus || ""
        this.apsapprove1Status = data?.apsapprove1Status || ""
        this.apsapprove2Status = data?.apsapprove2Status || ""
        this.apsapprove3Status = data?.apsapprove3Status || ""
        this.apsapprove4Status = data?.apsapprove4Status || ""
        this.apsapprove5Status = data?.apsapprove5Status || ""
        this.numberCheck1 = data?.numberCheck1 ?? 0
        this.numberCheck2 = data?.numberCheck2 ?? 0
        this.numberCheck3 = data?.numberCheck3 ?? 0
        this.numberCheck4 = data?.numberCheck4 ?? 0
        this.numberCheck5 = data?.numberCheck5 ?? 0
        this.weightedTotal = data?.weightedTotal ?? 0
        this.averageScore = data?.averageScore ?? 0
        this.apsassessyComment = data?.apsassessyComment || ""
        this.apsapprove1Comment = data?.apsapprove1Comment || ""
        this.apsapprove2Comment = data?.apsapprove2Comment || ""
        this.apsapprove3Comment = data?.apsapprove3Comment || ""
        this.apsapprove4Comment = data?.apsapprove4Comment || ""
        this.apsapprove5Comment = data?.apsapprove5Comment || ""
        this.apsassessyDate = data?.apsassessyDate || ""
        this.apsapprove1Date = data?.apsapprove1Date || ""
        this.apsapprove2Date = data?.apsapprove2Date || ""
        this.apsapprove3Date = data?.apsapprove3Date || ""
        this.apsapprove4Date = data?.apsapprove4Date || ""
        this.apsapprove5Date = data?.apsapprove5Date || ""
        this.evaluationResults = data?.evaluationResults || ""
        this.sumEvaluationResults = data?.sumEvaluationResults || ""
    }
}