package cn.reghao.tnb.content.app.exam.model.vo;

import cn.reghao.tnb.common.util.StringUtil;
import cn.reghao.tnb.content.app.exam.model.po.QuestionOption;

/**
 * @author reghao
 * @date 2024-08-25 22:36:35
 */
public class QuestionOptionDetail {
    private String option;
    private String content;
    private String analysis;
    private boolean correct;

    public QuestionOptionDetail(QuestionOption option) {
        this.option = StringUtil.getUppercaseLetter(option.getPos());
        this.content = option.getContent();
        this.analysis = option.getAnalysis().isBlank() ? "无" : option.getAnalysis();
        this.correct = option.getCorrect();
    }
}
