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_user")
public class TrainingExamUserEntity extends BaseEntity implements Serializable{

    private static final long serialVersionUID = 1L;

    @Schema(description = "考试ID")
    @TableField("F_ExamId")
    private String examId;

    @Schema(description = "用户ID")
    @TableField("F_UserId")
    private String userId;

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

    @Schema(description = "试卷名称")
    @TableField("F_PaperName")
    private String paperName;

    @Schema(description = "用时")
    @TableField("F_Duration")
    private Long duration;

    @Schema(description = "考分")
    @TableField("F_Score")
    private Integer score;

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

    @Schema(description = "完成考试时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("F_FinishTime")
    private LocalDateTime finishTime;

    @Schema(description = "状态（0待考试，1待批阅，2已逾期，3合格，4不合格，5优秀）")
    @TableField("F_Status")
    private String status;

    @Schema(description = "正确数）")
    @TableField("F_correctCount")
    private Integer correctCount;

    @Schema(description = "排名，用于百分比合格判断是否通过")
    @TableField("F_Rank")
    private Integer examRank;

    @Schema(description = "考试内容")
    @TableField("F_Content")
    private String content;

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

    @Schema(description = "学习内容ID")
    @TableField("F_LearningId")
    private String learningId;
}