package com.qmth.teachcloud.common.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.teachcloud.common.base.BaseEntity;
import com.qmth.teachcloud.common.enums.ObjectivePolicy;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 小题信息表
 * </p>
 *
 * @author xf
 * @since 2023-09-22
 */
@TableName("mark_question")
@ApiModel(value="MarkQuestion对象", description="小题信息表")
public class MarkQuestion extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "考试ID")
    private Long examId;

    @ApiModelProperty(value = "试卷类型")
    private String paperNumber;

    @ApiModelProperty(value = "试卷卷型")
    private String paperType;

    @ApiModelProperty(value = "是否客观题")
    private Boolean objective;

    @ApiModelProperty(value = "分组序号")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Integer groupNumber;

    @ApiModelProperty(value = "大题号")
    private Integer mainNumber;

    @ApiModelProperty(value = "小题号")
    private Integer subNumber;

    @ApiModelProperty(value = "大题名称")
    private String mainTitle;

    @ApiModelProperty(value = "正确答案")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String answer;
    @ApiModelProperty(value = "客观题答案数量")
    private Integer optionCount;

    @ApiModelProperty(value = "满分")
    private Double totalScore;

    @ApiModelProperty(value = "评卷间隔分")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Double intervalScore;

    @ApiModelProperty(value = "客观题判分策略")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private ObjectivePolicy objectivePolicy;

    @ApiModelProperty(value = "客观题判分策略计分")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Double objectivePolicyScore;

    @ApiModelProperty(value = "题型")
    private Integer questionType;
    
    private Integer paperIndex;
    
    private Integer pageIndex;

    private String name;

    public Long getExamId() {
        return examId;
    }

    public void setExamId(Long examId) {
        this.examId = examId;
    }
    public String getPaperNumber() {
        return paperNumber;
    }

    public void setPaperNumber(String paperNumber) {
        this.paperNumber = paperNumber;
    }

    public String getPaperType() {
        return paperType;
    }

    public void setPaperType(String paperType) {
        this.paperType = paperType;
    }

    public Boolean getObjective() {
        return objective;
    }

    public void setObjective(Boolean objective) {
        this.objective = objective;
    }

    public Integer getGroupNumber() {
        return groupNumber;
    }

    public void setGroupNumber(Integer groupNumber) {
        this.groupNumber = groupNumber;
    }
    public Integer getMainNumber() {
        return mainNumber;
    }

    public void setMainNumber(Integer mainNumber) {
        this.mainNumber = mainNumber;
    }
    public Integer getSubNumber() {
        return subNumber;
    }

    public void setSubNumber(Integer subNumber) {
        this.subNumber = subNumber;
    }
    public String getMainTitle() {
        return mainTitle;
    }

    public void setMainTitle(String mainTitle) {
        this.mainTitle = mainTitle;
    }
    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public Integer getOptionCount() {
        return optionCount;
    }

    public void setOptionCount(Integer optionCount) {
        this.optionCount = optionCount;
    }

    public Double getTotalScore() {
        return totalScore;
    }

    public void setTotalScore(Double totalScore) {
        this.totalScore = totalScore;
    }
    public Double getIntervalScore() {
        return intervalScore;
    }

    public void setIntervalScore(Double intervalScore) {
        this.intervalScore = intervalScore;
    }
    public ObjectivePolicy getObjectivePolicy() {
        return objectivePolicy;
    }

    public void setObjectivePolicy(ObjectivePolicy objectivePolicy) {
        this.objectivePolicy = objectivePolicy;
    }
    public Integer getQuestionType() {
        return questionType;
    }

    public void setQuestionType(Integer questionType) {
        this.questionType = questionType;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getQuestionNumber() {
        return getMainNumber() + "." + getSubNumber();
    }
    public Integer getPaperIndex() {
		return paperIndex;
	}

	public void setPaperIndex(Integer paperIndex) {
		this.paperIndex = paperIndex;
	}

	public Integer getPageIndex() {
		return pageIndex;
	}

	public void setPageIndex(Integer pageIndex) {
		this.pageIndex = pageIndex;
	}

	@Override
    public String toString() {
        return "MarkQuestion{" +
            ", examId=" + examId +
            ", paperNumber=" + paperNumber +
            ", objective=" + objective +
            ", groupNumber=" + groupNumber +
            ", mainNumber=" + mainNumber +
            ", subNumber=" + subNumber +
            ", mainTitle=" + mainTitle +
            ", answer=" + answer +
            ", totalScore=" + totalScore +
            ", intervalScore=" + intervalScore +
            ", objectivePolicy=" + objectivePolicy +
            ", questionType=" + questionType +
            ", name=" + name +
        "}";
    }

    public Double getObjectivePolicyScore() {
        return objectivePolicyScore;
    }

    public void setObjectivePolicyScore(Double objectivePolicyScore) {
        this.objectivePolicyScore = objectivePolicyScore;
    }
}
