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
    weightScore1: number
    weightScore2: number
    weightScore3: number
    weightScore4: number
    weightScore5: 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
    weightScore1: number
    weightScore2: number
    weightScore3: number
    weightScore4: number
    weightScore5: 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.weightScore1 = data?.weightScore1 ?? 0
        this.weightScore2 = data?.weightScore2 ?? 0
        this.weightScore3 = data?.weightScore3 ?? 0
        this.weightScore4 = data?.weightScore4 ?? 0
        this.weightScore5 = data?.weightScore5 ?? 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 || ""
    }
}

