import { Obj } from './ObjBean';

export class ExercisesBean extends Obj {
    
   answerArr : Array<AnswerBean> = [];

   rightAnswer : AnswerBean;
}

export class AnswerBean extends Obj {
    /**类型：T-文本， P - 图片 */
    contentType = 'T';

    /**正确答案：0-否，1-是 */
    isRight = '0';
}

export function getDefaultExercises(){
    const exercises = new ExercisesBean();

    exercises.rightAnswer = getDefaultAnswer(); 

    exercises.rightAnswer.isRight = "1";

    exercises.answerArr = [];

    return exercises;
}

export function getDefaultAnswer(){
    const answer = new AnswerBean();

    return answer;
}