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

import cn.reghao.tnb.content.app.exam.model.po.Question;
import lombok.Getter;
import lombok.Setter;

import java.util.Collections;
import java.util.List;

/**
 * @author reghao
 * @date 2024-08-24 16:03:44
 */
@Setter
@Getter
public class QuestionInfo {
    private int pos;
    private int questionType;
    private long questionId;
    private String questionContent;
    private List<QuestionAnswerInfo> questionOptions;
    private int score;
    @Deprecated
    private List<QuestionAnswerInfo> answer;
    private List<QuestionInfo> children;

    public QuestionInfo(int pos, Question question, int score) {
        this.pos = pos;
        this.questionType = question.getType();
        this.questionId = question.getQuestionId();
        this.questionContent = question.getContent();
        this.answer = Collections.emptyList();
        this.score = score;
    }
}
