package com.ynfy.buss.exam.question.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.questionanswer.entity.QuestionAnswer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
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: question
 * @Author: jeecg-boot
 * @Date: 2023-02-22
 * @Version: V1.0
 */
@Data
@TableName("question")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "question对象", description = "question")
public class Question implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    private String id;
    /**
     * 类型
     */
    @Excel(name = "类型", width = 15)
    @ApiModelProperty(value = "类型")
    @Dict(dicCode = "question_type")
    private Integer type;
    /**
     * 级别
     */
    @Excel(name = "级别", width = 15)
    @ApiModelProperty(value = "级别")
    @Dict(dicCode = "question_level")
    private Integer level;
    /**
     * 内容
     */
    @Excel(name = "内容", width = 15)
    @ApiModelProperty(value = "内容")
    private String content;
    /**
     * createTime
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "createTime")
    private Date createTime;
    /**
     * updateTime
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "updateTime")
    private Date updateTime;
    /**
     * 备注
     */
    @Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remark;
    /**
     * 解析
     */
    @Excel(name = "解析", width = 15)
    @ApiModelProperty(value = "解析")
    private String analysis;

    @ApiModelProperty(value = "题库列表")
    private String repositoryId;

    /**
     * 按序作答
     */
    @Excel(name = "按序作答", width = 15)
    @ApiModelProperty(value = "按序作答")
    private Boolean answerOrder;

    /**
     * 题库名称
     */
    @TableField(exist = false)
    private String repositoryName;

    /**
     * 分数
     */
    @TableField(exist = false)
    private Integer score;

    /**
     * 答案选项
     */
    @TableField(exist = false)
    private List<QuestionAnswer> answerList;

    /**
     * 题数
     */
    @TableField(exist = false)
    private Integer questionNum;
}


