package com.ruoyi.learn.domain;

import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 试卷题关系对象 learn_paper_question
 * 
 * @author ruoyi
 * @date 2025-09-18
 */
public class LearnPaperQuestion extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 试卷题id */
    private Long id;

    /** 知识点id */
    private Long knowledgeId;

    /** 试卷id */
    @Excel(name = "试卷id")
    private Long paperId;

    /** 题id */
    @Excel(name = "题id")
    private Long questionId;

    /** 顺序 */
    @Excel(name = "顺序")
    private Integer seq;

    /** 分值 */
    @Excel(name = "分值")
    private Double score;

    @Excel(name = "题型")
    private String type;

    @Excel(name = "兼容题型")
    private String qtpye;

    @Excel(name = "难度")
    private Integer diff;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public Long getKnowledgeId() {
        return knowledgeId;
    }

    public void setKnowledgeId(Long knowledgeId) {
        this.knowledgeId = knowledgeId;
    }

    public void setPaperId(Long paperId)
    {
        this.paperId = paperId;
    }

    public Long getPaperId() 
    {
        return paperId;
    }

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

    public Long getQuestionId() 
    {
        return questionId;
    }

    public void setSeq(Integer seq)
    {
        this.seq = seq;
    }

    public Integer getSeq()
    {
        return seq;
    }

    public void setScore(Double score)
    {
        this.score = score;
    }

    public Double getScore()
    {
        return score;
    }

    public String getType() {
        return StringUtils.isBlank(type) ? qtpye : type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getQtpye() {
        return qtpye;
    }

    public void setQtpye(String qtpye) {
        this.qtpye = qtpye;
    }

    public Integer getDiff() {
        return diff;
    }

    public void setDiff(Integer diff) {
        this.diff = diff;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("paperId", getPaperId())
            .append("questionId", getQuestionId())
            .append("seq", getSeq())
            .append("score", getScore())
            .append("createTime", getCreateTime())
            .toString();
    }
}
