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

import com.sundot.airport.exam.enums.QuesOptionTypeEnum;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <b>功能名：</b>QuesUpdParam<br>
 * <b>说明：</b> 题目选项参数类 <br>
 * <b>著作权：</b> Copyright (C) 2021 HUIFANEDU  CORPORATION<br>
 * <b>修改履历：
 *
 * @author 2021/6/21 liangxiao
 */
public class QuesOptionParam {

    /**
     * 选项排序
     */
    private Integer sort;
    /**
     * 是否正确答案（0否1是）
     */
    @NotNull(message = "是否是正确答案必填")
    private Boolean qoCorrect;

    /**
     * 选项图片类型
     * - TEXT文字；IMG图片
     */
    private QuesOptionTypeEnum qoOptionType;

    /**
     * 选项内容or图片资源id
     */
    @NotBlank(message = "选项内容不能为空")
    @Length(max = 300, message = "选项长度最多为300")
    private String qoOption;

    /**
     * 对应连线选项排序
     */
    private Integer qoConnSort;

    /**
     * 对应连线选项图片类型
     * - TEXT文字；IMG图片
     */
    private QuesOptionTypeEnum qoConnOptType;

    /**
     * 对应连线选项内容or图片资源id
     */
    private String qoConnOpt;

    @Override
    public String toString() {
        return "Option{" +
                "sort=" + sort +
                ", qoCorrect=" + qoCorrect +
                ", qoOptionType=" + qoOptionType +
                ", qoOption='" + qoOption + '\'' +
                ", qoConnSort=" + qoConnSort +
                ", qoConnOptType=" + qoConnOptType +
                ", qoConnOpt='" + qoConnOpt + '\'' +
                '}';
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Boolean getQoCorrect() {
        return qoCorrect;
    }

    public void setQoCorrect(Boolean qoCorrect) {
        this.qoCorrect = qoCorrect;
    }

    public QuesOptionTypeEnum getQoOptionType() {
        return qoOptionType;
    }

    public void setQoOptionType(QuesOptionTypeEnum qoOptionType) {
        this.qoOptionType = qoOptionType;
    }

    public String getQoOption() {
        return qoOption;
    }

    public void setQoOption(String qoOption) {
        this.qoOption = qoOption;
    }

    public Integer getQoConnSort() {
        return qoConnSort;
    }

    public void setQoConnSort(Integer qoConnSort) {
        this.qoConnSort = qoConnSort;
    }

    public QuesOptionTypeEnum getQoConnOptType() {
        return qoConnOptType;
    }

    public void setQoConnOptType(QuesOptionTypeEnum qoConnOptType) {
        this.qoConnOptType = qoConnOptType;
    }

    public String getQoConnOpt() {
        return qoConnOpt;
    }

    public void setQoConnOpt(String qoConnOpt) {
        this.qoConnOpt = qoConnOpt;
    }
}
