package jnpf.entity.training;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jnpf.entity.BaseEntity;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 考试
 *
 * @author yanglei
 * @since 2023-07-22
 */
@Data
@Accessors(chain = true)
@TableName("ftb_training_exam")

public class TrainingExamEntity extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;


    @Schema(description = "试卷ID")
    @TableField("F_PaperId")
    private String paperId;

    @Schema(description = "关联场景类型（1是统考，2是岗位）")
    @TableField("F_MapType")
    private Integer mapType;

    @Schema(description = "距离上个任务多少天完成")
    @TableField("F_LastDays")
    private Integer lastDays;

    @Schema(description = "开始时间")
    @TableField("F_StartTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    @Schema(description = "结束时间")
    @TableField("F_EndTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    @Schema(description = "时长")
    @TableField("F_Duration")
    private Integer duration;

    @Schema(description = "合格类型（1固定分，2百分比）")
    @TableField("F_PassType")
    private Integer passType;

    @Schema(description = "合格分数")
    @TableField("F_PassMark")
    private Integer passMark;

    @Schema(description = "计算后合格分数")
    @TableField("F_LastPassMark")
    private Integer lastPassMark;

    @Schema(description = "优秀类型（1固定分，2百分比）")
    @TableField("F_ExcellentType")
    private Integer excellentType;

    @Schema(description = "优秀分数")
    @TableField("F_ExcellentMark")
    private Integer excellentMark;

    @Schema(description = "计算后优秀分数")
    @TableField("F_LastExcellentMark")
    private Integer lastExcellentMark;

    @Schema(description = "规则说明")
    @TableField("F_Description")
    private String description;

    @Schema(description = "完成标准（1提交考试，2通过考试）")
    @TableField("F_CompletionCriteria")
    private Integer completionCriteria;

    @Schema(description = "题目顺序（1不随机，2按题目随机，3按题型随机）")
    @TableField("F_QuestionOrder")
    private Integer questionOrder;

    @Schema(description = "选项顺序（1不随机，2随机）")
    @TableField("F_OptionOrder")
    private Integer optionOrder;

    @Schema(description = "考试状态,1是未开始，2进行中，3已结束")
    @TableField("F_Status")
    private Integer status;

    @Schema(description = "角色id")
    @TableField("F_Role_Id")
    private String roleId;

    @TableField(exist = false)
    @Schema(description = "角色名称")
    private String roleFullName;

    @TableField(exist = false)
    @Schema(description = "批阅是否显示")
    private Boolean readCheck;
}