import { CompetencyIndicatorsCourses1ListModel, MyCompetencyIndicatorsCourses1ListModel } from "./competency-indicators-courses1-list.model";
import { CompetencytopicModel, MyCompetencytopicModel } from "./competencytopic.model";

export interface IndicatorsCoursesModel {
    competencyTopic: CompetencytopicModel
    companyId: string
    edesc: string
    tdesc: string
    indicatorsCourseDetailTh: string
    indicatorsCourseDetailEn: string
    expectation:string
    competencyIndicatorsCourses1List: CompetencyIndicatorsCourses1ListModel[]
}

export class MyIndicatorsCoursesModel implements IndicatorsCoursesModel {
    competencyTopic: CompetencytopicModel
    companyId: string
    edesc: string
    tdesc: string
    indicatorsCourseDetailTh: string
    indicatorsCourseDetailEn: string
    expectation:string
    competencyIndicatorsCourses1List: CompetencyIndicatorsCourses1ListModel[]
    constructor(data?: Partial<IndicatorsCoursesModel>) {
        this.competencyTopic = new MyCompetencytopicModel(data?.competencyTopic || {})
        this.companyId = data?.companyId || ""
        this.edesc = data?.edesc || ""
        this.tdesc = data?.tdesc || ""
        this.indicatorsCourseDetailTh = data?.indicatorsCourseDetailTh || ""
        this.indicatorsCourseDetailEn = data?.indicatorsCourseDetailEn || ""
        this.expectation = data?.expectation || ""
        this.competencyIndicatorsCourses1List = data?.competencyIndicatorsCourses1List?.map(x => new MyCompetencyIndicatorsCourses1ListModel(x)) || []
    }
}