package com.xinelu.manage.domain.questionsubject;

import com.xinelu.common.annotation.Excel;
import com.xinelu.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;

/**
 * 问卷题目信息对象 question_subject
 *
 * @author xinelu
 * @date 2024-02-29
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "问卷题目信息对象", description = "question_subject")
public class QuestionSubject extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    private Long id;

    /**
     * 问卷表id
     */
    @ApiModelProperty(value = "问卷表id")
    @Excel(name = "问卷表id")
    private Long questionInfoId;

    /**
     * 题目序号
     */
    @ApiModelProperty(value = "题目序号")
    @Excel(name = "题目序号")
    private BigDecimal questionNumber;

    /**
     * 题目类型，单选题：MULTIPLE_CHOICE，多选题：MULTIPLE_CHOICE_QUESTIONS，填空题：FILL_IN_THE_BLANKS，打分题：SCORING_QUESTIONS，
     * 组合单选题：COMBINATION_RADIO_SUBJECT，组合多选题：COMBINATION_MULTIPLE_SUBJECT，组合填空题：COMBINATION_BLANKS_SUBJECT，
     * 组合打分题：COMBINATION_SCORING_SUBJECT，日期填空题：DATE_BLANKS_SUBJECT，时间填空题：TIME_BLANKS_SUBJECT
     */
    @ApiModelProperty(value = "题目类型，单选题：MULTIPLE_CHOICE，多选题：MULTIPLE_CHOICE_QUESTIONS，填空题：FILL_IN_THE_BLANKS，打分题：SCORING_QUESTIONS，组合单选题：COMBINATION_RADIO_SUBJECT，组合多选题：COMBINATION_MULTIPLE_SUBJECT，组合填空题：COMBINATION_BLANKS_SUBJECT， 组合打分题：COMBINATION_SCORING_SUBJECT，日期填空题：DATE_BLANKS_SUBJECT，时间填空题：TIME_BLANKS_SUBJECT;反馈填空题：FEEDBACK_BLANKS_SUBJECT")
    @Excel(name = "题目类型，单选题：MULTIPLE_CHOICE，多选题：MULTIPLE_CHOICE_QUESTIONS，填空题：FILL_IN_THE_BLANKS，打分题：SCORING_QUESTIONS， 组合单选题：COMBINATION_RADIO_SUBJECT，组合多选题：COMBINATION_MULTIPLE_SUBJECT，组合填空题：COMBINATION_BLANKS_SUBJECT， 组合打分题：COMBINATION_SCORING_SUBJECT，日期填空题：DATE_BLANKS_SUBJECT，时间填空题：TIME_BLANKS_SUBJECT;反馈填空题：FEEDBACK_BLANKS_SUBJECT")
    private String questionType;

    /**
     * 题目名称
     */
    @ApiModelProperty(value = "题目名称")
    @Excel(name = "题目名称")
    private String questionName;

    /**
     * 题目名称别名
     */
    @ApiModelProperty(value = "题目名称")
    @Excel(name = "题目名称")
    private String questionNameAlias;


    /**
     * 题目说明
     */
    @ApiModelProperty(value = "题目说明")
    @Excel(name = "题目说明")
    private String questionDescription;

    /**
     * 填写说明
     */
    @ApiModelProperty(value = "填写说明")
    @Excel(name = "填写说明")
    private String writeDescription;

    /**
     * 回答（填空题）
     */
    @ApiModelProperty(value = "回答")
    @Excel(name = "回答", readConverterExp = "填=空题")
    private String fillBlanksAnswer;

    /**
     * 选项个数（打分题）
     */
    @ApiModelProperty(value = "选项个数")
    @Excel(name = "选项个数", readConverterExp = "打=分题")
    private Integer optionCount;

    /**
     * 是否计分，0：否，1：是
     */
    @ApiModelProperty(value = "是否计分，0：否，1：是")
    @Excel(name = "是否计分，0：否，1：是")
    private Boolean whetherScore;

    /**
     * 计分方式，每个选项都有对应分值：NOT_UNIQUE_ANSWER，全部答对才得分：UNIQUE_ANSWER
     */
    @ApiModelProperty(value = "计分方式，每个选项都有对应分值：NOT_UNIQUE_ANSWER，全部答对才得分：UNIQUE_ANSWER")
    @Excel(name = "计分方式，每个选项都有对应分值：NOT_UNIQUE_ANSWER，全部答对才得分：UNIQUE_ANSWER")
    private String scoringMethod;

    /**
     * 计分说明
     */
    @ApiModelProperty(value = "计分说明")
    @Excel(name = "计分说明")
    private String scoringDescription;

    /**
     * 题目分值
     */
    @ApiModelProperty(value = "题目分值")
    @Excel(name = "题目分值")
    private BigDecimal questionScore;

    /**
     * 自定义触发条件
     */
    @ApiModelProperty(value = "自定义触发条件")
    @Excel(name = "自定义触发条件")
    private String customTriggerCondition;

    /**
     * 所属宣教表id
     */
    @ApiModelProperty(value = "所属宣教表id")
    @Excel(name = "所属宣教表id")
    private Long propagandaInfoId;

    /**
     * 宣教标题（宣教名称）
     */
    @ApiModelProperty(value = "宣教标题")
    @Excel(name = "宣教标题", readConverterExp = "宣=教名称")
    private String propagandaTitle;

    /**
     * 题目排序
     */
    @ApiModelProperty(value = "题目排序")
    @Excel(name = "题目排序")
    private Integer questionSort;

    /**
     * 题目备注
     */
    @ApiModelProperty(value = "题目备注")
    @Excel(name = "题目备注")
    private String questionRemark;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("questionInfoId", getQuestionInfoId())
                .append("questionNumber", getQuestionNumber())
                .append("questionType", getQuestionType())
                .append("questionName", getQuestionName())
                .append("questionDescription", getQuestionDescription())
                .append("writeDescription", getWriteDescription())
                .append("fillBlanksAnswer", getFillBlanksAnswer())
                .append("optionCount", getOptionCount())
                .append("whetherScore", getWhetherScore())
                .append("scoringMethod", getScoringMethod())
                .append("scoringDescription", getScoringDescription())
                .append("questionScore", getQuestionScore())
                .append("customTriggerCondition", getCustomTriggerCondition())
                .append("propagandaInfoId", getPropagandaInfoId())
                .append("propagandaTitle", getPropagandaTitle())
                .append("questionSort", getQuestionSort())
                .append("questionRemark", getQuestionRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
