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

import cn.reghao.tnb.content.app.exam.model.dto.QuestionAddDto;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @author reghao
 * @date 2024-08-25 20:32:55
 */
@NoArgsConstructor
@Getter
public class QuestionOption {
    private Integer questionId;
    private Integer pos;
    private String content;
    private String analysis;
    private Boolean correct;

    public QuestionOption(int pos, QuestionAddDto.Option option) {
        this.pos = pos;
        this.content = option.getContent();
        this.analysis = option.getAnalysis();
        this.correct = option.getCorrect();
    }

    public void setQuestionId(Integer questionId) {
        this.questionId = questionId;
    }
}
