package com.ynfy.buss.exam.userexamquestion.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ynfy.buss.exam.question.entity.Question;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Description: 用户考试试题
 * @Author: jeecg-boot
 * @Date: 2023-03-05
 * @Version: V1.0
 */
@Data
@TableName("user_exam_question")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "user_exam_question对象", description = "用户考试试题")
public class UserExamQuestion implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
    /**
     * 用户考试id
     */
    @Excel(name = "用户考试id", width = 15)
    @ApiModelProperty(value = "用户考试id")
    private String userExamId;
    /**
     * 试卷id
     */
    @Excel(name = "试卷id", width = 15)
    @ApiModelProperty(value = "试卷id")
    private String paperId;
    /**
     * 题目id
     */
    @Excel(name = "题目id", width = 15)
    @ApiModelProperty(value = "题目id")
    private String questionId;
    /**
     * 题目类型
     */
    @Excel(name = "题目类型", width = 15)
    @ApiModelProperty(value = "题目类型")
    private Integer questionType;
    /**
     * 问题排序
     */
    @Excel(name = "问题排序", width = 15)
    @ApiModelProperty(value = "问题排序")
    private Integer sort;
    /**
     * 题目分值
     */
    @Excel(name = "题目分值", width = 15)
    @ApiModelProperty(value = "题目分值")
    private Double questionScore;
    /**
     * 是否已答
     */
    @Excel(name = "是否已答", width = 15)
    @ApiModelProperty(value = "是否已答")
    private Boolean answered;
    /**
     * 是否答对
     */
    @Excel(name = "是否答对", width = 15)
    @ApiModelProperty(value = "是否答对")
    private Boolean isRight;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**
     * 创建日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    /**
     * 更新日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;

    @ApiModelProperty(value = "答案")
    private String answer;

    @TableField(exist = false)
    private Question question;

    /**
     * 题目序号
     */
    private Integer questionIndex;

    /**
     * 题目类型名称
     */
    @TableField(exist = false)
    private String questionTypeName;

    /**
     * 实际得分
     */
    @Excel(name = "实际得分", width = 15)
    @ApiModelProperty(value = "实际得分")
    private Double actualScore;

    /**
     * 漏选也给分
     */
    @Excel(name = "漏选也给分", width = 15)
    @ApiModelProperty(value = "漏选也给分")
    private Boolean canMissOption;

    /**
     * 按空给分
     */
    @Excel(name = "按空给分", width = 15)
    @ApiModelProperty(value = "按空给分")
    private Boolean canBlankOption;

    /**
     * 是否子题目
     */
    @Excel(name = "是否子题目", width = 15)
    @ApiModelProperty(value = "是否子题目")
    private Boolean child;

    /**
     * 父题目id
     */
    @Excel(name = "父题目id", width = 15)
    @ApiModelProperty(value = "父题目id")
    private String parentQuestionId;

    @TableField(exist = false)
    private List<UserExamQuestion> subQuestionList;
}
