package com.sundot.airport.exam.logic.manage.model.params;

import com.sundot.airport.exam.enums.QuesTypeEnum;
import com.sundot.airport.exam.logic.manage.model.params.sub.QuesOptionParam;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * <b>功能名：</b>QuesAddParam<br>
 * <b>说明：</b> 新增题目添加请求参数 <br>
 * <b>著作权：</b> Copyright (C) 2021 HUIFANEDU  CORPORATION<br>
 * <b>修改履历：
 *
 * @author 2021-06-18 liangxiao
 */
public class QuesAddParam {

    /**
     * 题目类型。
     * - SINGLE单选；MULTIPLE多选；JUDGMENT判断；FILL_BLANK填空；CONNECTION连线
     */
    @NotNull(message = "题目类型不能为空")
    private QuesTypeEnum quType;

    /**
     * 题干内容
     */
    @NotBlank(message = "题干不能为空")
    @Length(max = 500, message = "题干长度最多为500")
    private String quContent;

    /**
     * 题目分类表业务主键
     * - 如果为空就是，空字符串，属于未分类的题目
     */
    private String qcId;

    /**
     * 选项列表
     */
    @Valid
    @NotEmpty(message = "选项列表不能为空")
    private List<QuesOptionParam> option;

    @Override
    public String toString() {
        return "QuesAddParam{" +
                "quType=" + quType +
                ", quContent='" + quContent + '\'' +
                ", qcId='" + qcId + '\'' +
                ", option=" + option +
                '}';
    }

    public QuesTypeEnum getQuType() {
        return quType;
    }

    public void setQuType(QuesTypeEnum quType) {
        this.quType = quType;
    }

    public String getQuContent() {
        return quContent;
    }

    public void setQuContent(String quContent) {
        this.quContent = quContent;
    }

    public String getQcId() {
        return qcId;
    }

    public void setQcId(String qcId) {
        this.qcId = qcId;
    }

    public List<QuesOptionParam> getOption() {
        return option;
    }

    public void setOption(List<QuesOptionParam> option) {
        this.option = option;
    }
}
