package ink.wgink.module.examine.pojo.dtos.question;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.StringUtils;

/**
 * @ClassName: TestQuestionOptionsDTO
 * @Description: 试题选项
 * @Author: WenG
 * @Date: 2020-09-09 21:00
 * @Version: 1.0
 **/
@ApiModel
public class QuestionOptionsDTO implements Comparable {

    @ApiModelProperty(name = "questionOptionsId", value = "主键")
    private String questionOptionsId;
    @ApiModelProperty(name = "questionId", value = "试题")
    private String questionId;
    @ApiModelProperty(name = "option", value = "标识")
    private String option;
    @ApiModelProperty(name = "content", value = "内容")
    private String content;

    public String getQuestionOptionsId() {
        return questionOptionsId == null ? "" : questionOptionsId.trim();
    }

    public void setQuestionOptionsId(String questionOptionsId) {
        this.questionOptionsId = questionOptionsId;
    }

    public String getQuestionId() {
        return questionId == null ? "" : questionId.trim();
    }

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

    public String getOption() {
        return option == null ? "" : option.trim();
    }

    public void setOption(String option) {
        this.option = option;
    }

    public String getContent() {
        return content == null ? "" : content.trim();
    }

    public void setContent(String content) {
        this.content = content;
    }


    @Override
    public int compareTo(Object o) {
        return StringUtils.compare(option, ((QuestionOptionsDTO) o).getOption());
    }
}
