package com.qmth.themis.business.cache.bean;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.themis.business.enums.*;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Objects;

public class ExamCacheBean implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = -1544653057729256077L;

    //主键
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    //创建人id
    @JsonSerialize(using = ToStringSerializer.class)
    private Long createId;

    //创建时间
    private Long createTime;

    //修改人id
    @JsonSerialize(using = ToStringSerializer.class)
    private Long updateId;

    //修改时间
    private Long updateTime;

    //机构ID
    @JsonSerialize(using = ToStringSerializer.class)
    private Long orgId;

    //批次编码，机构唯一
    private String code;

    //批次名称
    private String name;

    //批次标注，可用于多个考试批次归类
    private String tag;

    //批次开始时间
    private Long startTime;

    //批次结束时间
    private Long endTime;

    //考试口令
    private String shortCode;

    //提前多长时间开始候考(分钟)
    private Integer prepareSeconds;

    //最短考试时长，相当于考试冻结时间(分钟)
    private Integer minDurationSeconds;

    //考前须知
    private String preNotice;

    //考试须知阅读时长(秒)
    private Integer preNoticeStaySeconds;

    //考后说明，针对一个场次进行设置
    private String postNotice;

    //允许考试次数
    private Integer examCount;

    //断点失效时间(秒)
    private Integer breakExpireSeconds;

    //断点续考次数
    private Integer breakResumeCount;

    //是否允许使用摄像头拍照答题，0：不允许，1：允许
    private Integer cameraPhotoUpload;

    //重考是否审批，0：不审批，1：审批
    private Integer reexamAuditing;

    //交卷后是否显示客观得分，0：不显示，1：显示
    private Integer showObjectiveScore;

    //模式，0：集中统一，1：随到随考
    private ExamModeEnum mode;

    //是否启用，0：停用，1：启用
    private Integer enable;

    //是否归档，0：不归档，1：归档
    private Integer archived;

    //允许开考开放时长(分钟)，相当于迟到时间
    private Integer openingSeconds;

    //最大考试时长(分钟)
    private Integer maxDurationSeconds;

    //是否在结束时间集中强制收卷，0：不强制，1：强制
    private Integer forceFinish;

    //开考身份验证策略，off：关闭，face_verify_optional：非强制人脸验证，face_verify_force：强制人脸验证，liveness：活体验证
    private EntryAuthenticationPolicyEnum entryAuthenticationPolicy;

    //考试过程中人脸检测是否开启，0：不开启，1：开启
    private Integer inProcessFaceVerify;

    //考试过程中人脸检测是否忽略陌生人 ，0：不忽略，1：忽略
    private Integer inProcessFaceStrangerIgnore;

    //考试过程中是否启用活体检测 ，0：不启用，1：启用
    private Integer inProcessLivenessVerify;

    //考试过程中活体检测间隔时间
    private Integer inProcessLivenessIntervalSeconds;

    //考试过程中活体检测结果判定规则，any：任意一次通过，all：全部都要通过，more：通过次数大于失败次数
    private InProcessLivenessJudgePolicyEnum inProcessLivenessJudgePolicy;

    //多次考试记录的选择逻辑，highest_total_score：全部阅卷后取最高分，highest_objective_score：客观分最高，latest：最后一次提交
    private RecordSelectStrategyEnum recordSelectStrategy;

    //是否IP段限制，0：不允许，1：允许
    private Integer enableIpLimit;

    //允许IP段
    private String ipAllow;

    //算分状态，never：从未算分，calculating：正在算分，finish：算分完成
    private ScoreStatusEnum scoreStatus;

    //客观题给分策略，equal: 全对给分，partial: 漏选给一半分
    private ObjectiveScorePolicyEnum objectiveScorePolicy;

    //开启监控的视频源
    private String monitorVideoSource;

    private Boolean monitorAudioEnable = false;//客户端监控是否启用音频与麦克风

//    //是否开始监控转录，off:禁用; mix:混流转录
//    private MonitorRecordEnum monitorRecord;

    //开启转录的视频源
    private String monitorRecord;

    //是否允许使用移动端拍照答题，0：不开启，1：开启
//    private Integer mobilePhotoUpload;

    //考试过程中活体检测间隔时间
    private String inProcessLivenessFixedRange;

    //算分进度
    private Double progress;

    //监考人工审核，now：实时审核，later：事后审核
    private InvigilateVerifyEnum invigilateVerify;

    //监考状态，NOT_START：未开始，START：监考中，FINISHED：已结束
    private InvigilateMonitorStatusEnum monitorStatus;

    //考试过程中是否启用真实性检测，0：不启用，1：启用
    private Integer inProcessRealnessVerify;

    @ApiModelProperty(value = "扫描时间")
    private Long scanTime;

    @ApiModelProperty(value = "第三方考试id")
    private String thirdExamId;

    @ApiModelProperty(value = "是否允许考生发起语音通话，0：否，1：是")
    private Integer examStudentCallEnable;

    @ApiModelProperty(value = "是否推送客观分，false：否，true：是")
    private Boolean objectiveScorePush;

    @ApiModelProperty(value = "是否推送违纪考生，false：否，true：是")
    private Boolean examStudentBreachPush;

    public Integer getExamStudentCallEnable() {
        return examStudentCallEnable;
    }

    public void setExamStudentCallEnable(Integer examStudentCallEnable) {
        this.examStudentCallEnable = examStudentCallEnable;
    }

    public Boolean getObjectiveScorePush() {
        return objectiveScorePush;
    }

    public void setObjectiveScorePush(Boolean objectiveScorePush) {
        this.objectiveScorePush = objectiveScorePush;
    }

    public Boolean getExamStudentBreachPush() {
        return examStudentBreachPush;
    }

    public void setExamStudentBreachPush(Boolean examStudentBreachPush) {
        this.examStudentBreachPush = examStudentBreachPush;
    }

    public Long getScanTime() {
        return scanTime;
    }

    public void setScanTime(Long scanTime) {
        this.scanTime = scanTime;
    }

    public String getThirdExamId() {
        return thirdExamId;
    }

    public void setThirdExamId(String thirdExamId) {
        this.thirdExamId = thirdExamId;
    }

    public Integer getInProcessRealnessVerify() {
        return inProcessRealnessVerify;
    }

    public void setInProcessRealnessVerify(Integer inProcessRealnessVerify) {
        this.inProcessRealnessVerify = inProcessRealnessVerify;
    }

    public InvigilateVerifyEnum getInvigilateVerify() {
        return invigilateVerify;
    }

    public void setInvigilateVerify(InvigilateVerifyEnum invigilateVerify) {
        this.invigilateVerify = invigilateVerify;
    }

    public Double getProgress() {
        return progress;
    }

    public void setProgress(Double progress) {
        this.progress = progress;
    }

//    public Integer getMobilePhotoUpload() {
//        return mobilePhotoUpload;
//    }

//    public void setMobilePhotoUpload(Integer mobilePhotoUpload) {
//        this.mobilePhotoUpload = mobilePhotoUpload;
//    }

    public String getInProcessLivenessFixedRange() {
        return inProcessLivenessFixedRange;
    }

    public void setInProcessLivenessFixedRange(String inProcessLivenessFixedRange) {
        this.inProcessLivenessFixedRange = inProcessLivenessFixedRange;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Boolean getMonitorAudioEnable() {
        return monitorAudioEnable;
    }

    public void setMonitorAudioEnable(Boolean monitorAudioEnable) {
        this.monitorAudioEnable = monitorAudioEnable;
    }

    public String getMonitorVideoSource() {
        return monitorVideoSource;
    }

    public void setMonitorVideoSource(String monitorVideoSource) {
        this.monitorVideoSource = monitorVideoSource;
    }

    public String getMonitorRecord() {
        return monitorRecord;
    }

    public void setMonitorRecord(String monitorRecord) {
        this.monitorRecord = monitorRecord;
    }

    public ExamModeEnum getMode() {
        return mode;
    }

    public void setMode(ExamModeEnum mode) {
        this.mode = mode;
    }

    public Integer getEnable() {
        return enable;
    }

    public void setEnable(Integer enable) {
        this.enable = enable;
    }

    public Integer getArchived() {
        return archived;
    }

    public void setArchived(Integer archived) {
        this.archived = archived;
    }

    public Integer getForceFinish() {
        return forceFinish;
    }

    public void setForceFinish(Integer forceFinish) {
        this.forceFinish = forceFinish;
    }

    public EntryAuthenticationPolicyEnum getEntryAuthenticationPolicy() {
        return entryAuthenticationPolicy;
    }

    public void setEntryAuthenticationPolicy(EntryAuthenticationPolicyEnum entryAuthenticationPolicy) {
        this.entryAuthenticationPolicy = entryAuthenticationPolicy;
    }

    public Integer getInProcessFaceVerify() {
        return inProcessFaceVerify;
    }

    public void setInProcessFaceVerify(Integer inProcessFaceVerify) {
        this.inProcessFaceVerify = inProcessFaceVerify;
    }

    public Integer getInProcessFaceStrangerIgnore() {
        return inProcessFaceStrangerIgnore;
    }

    public void setInProcessFaceStrangerIgnore(Integer inProcessFaceStrangerIgnore) {
        this.inProcessFaceStrangerIgnore = inProcessFaceStrangerIgnore;
    }

    public Integer getInProcessLivenessVerify() {
        return inProcessLivenessVerify;
    }

    public void setInProcessLivenessVerify(Integer inProcessLivenessVerify) {
        this.inProcessLivenessVerify = inProcessLivenessVerify;
    }

    public Integer getInProcessLivenessIntervalSeconds() {
        return inProcessLivenessIntervalSeconds;
    }

    public void setInProcessLivenessIntervalSeconds(Integer inProcessLivenessIntervalSeconds) {
        this.inProcessLivenessIntervalSeconds = inProcessLivenessIntervalSeconds;
    }

    public InProcessLivenessJudgePolicyEnum getInProcessLivenessJudgePolicy() {
        return inProcessLivenessJudgePolicy;
    }

    public void setInProcessLivenessJudgePolicy(InProcessLivenessJudgePolicyEnum inProcessLivenessJudgePolicy) {
        this.inProcessLivenessJudgePolicy = inProcessLivenessJudgePolicy;
    }

    public RecordSelectStrategyEnum getRecordSelectStrategy() {
        return recordSelectStrategy;
    }

    public void setRecordSelectStrategy(RecordSelectStrategyEnum recordSelectStrategy) {
        this.recordSelectStrategy = recordSelectStrategy;
    }

    public Integer getEnableIpLimit() {
        return enableIpLimit;
    }

    public void setEnableIpLimit(Integer enableIpLimit) {
        this.enableIpLimit = enableIpLimit;
    }

    public String getIpAllow() {
        return ipAllow;
    }

    public void setIpAllow(String ipAllow) {
        this.ipAllow = ipAllow;
    }

    public ScoreStatusEnum getScoreStatus() {
        return scoreStatus;
    }

    public void setScoreStatus(ScoreStatusEnum scoreStatus) {
        this.scoreStatus = scoreStatus;
    }

    public Long getOrgId() {
        return orgId;
    }

    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getShortCode() {
        return shortCode;
    }

    public void setShortCode(String shortCode) {
        this.shortCode = shortCode;
    }

    public Integer getPrepareSeconds() {
        return prepareSeconds;
    }

    public void setPrepareSeconds(Integer prepareSeconds) {
        this.prepareSeconds = prepareSeconds;
    }

    public Integer getMinDurationSeconds() {
        return minDurationSeconds;
    }

    public void setMinDurationSeconds(Integer minDurationSeconds) {
        this.minDurationSeconds = minDurationSeconds;
    }

    public Integer getOpeningSeconds() {
        return openingSeconds;
    }

    public void setOpeningSeconds(Integer openingSeconds) {
        this.openingSeconds = openingSeconds;
    }

    public Integer getMaxDurationSeconds() {
        return maxDurationSeconds;
    }

    public void setMaxDurationSeconds(Integer maxDurationSeconds) {
        this.maxDurationSeconds = maxDurationSeconds;
    }

    public String getPreNotice() {
        return preNotice;
    }

    public void setPreNotice(String preNotice) {
        this.preNotice = preNotice;
    }

    public Integer getPreNoticeStaySeconds() {
        return preNoticeStaySeconds;
    }

    public void setPreNoticeStaySeconds(Integer preNoticeStaySeconds) {
        this.preNoticeStaySeconds = preNoticeStaySeconds;
    }

    public String getPostNotice() {
        return postNotice;
    }

    public void setPostNotice(String postNotice) {
        this.postNotice = postNotice;
    }

    public Integer getExamCount() {
        return Objects.isNull(examCount) ? 0 : examCount;
    }

    public void setExamCount(Integer examCount) {
        this.examCount = examCount;
    }

    public Integer getBreakExpireSeconds() {
        return breakExpireSeconds;
    }

    public void setBreakExpireSeconds(Integer breakExpireSeconds) {
        this.breakExpireSeconds = breakExpireSeconds;
    }

    public Integer getBreakResumeCount() {
        return Objects.isNull(breakResumeCount) ? 0 : breakResumeCount;
    }

    public void setBreakResumeCount(Integer breakResumeCount) {
        this.breakResumeCount = breakResumeCount;
    }

    public Integer getCameraPhotoUpload() {
        return cameraPhotoUpload;
    }

    public void setCameraPhotoUpload(Integer cameraPhotoUpload) {
        this.cameraPhotoUpload = cameraPhotoUpload;
    }

    public Integer getReexamAuditing() {
        return reexamAuditing;
    }

    public void setReexamAuditing(Integer reexamAuditing) {
        this.reexamAuditing = reexamAuditing;
    }

    public Integer getShowObjectiveScore() {
        return showObjectiveScore;
    }

    public void setShowObjectiveScore(Integer showObjectiveScore) {
        this.showObjectiveScore = showObjectiveScore;
    }

    public ObjectiveScorePolicyEnum getObjectiveScorePolicy() {
        return objectiveScorePolicy;
    }

    public void setObjectiveScorePolicy(ObjectiveScorePolicyEnum objectiveScorePolicy) {
        this.objectiveScorePolicy = objectiveScorePolicy;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getCreateId() {
        return createId;
    }

    public void setCreateId(Long createId) {
        this.createId = createId;
    }

    public Long getUpdateId() {
        return updateId;
    }

    public void setUpdateId(Long updateId) {
        this.updateId = updateId;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }

    public Long getStartTime() {
        return startTime;
    }

    public void setStartTime(Long startTime) {
        this.startTime = startTime;
    }

    public Long getEndTime() {
        return endTime;
    }

    public void setEndTime(Long endTime) {
        this.endTime = endTime;
    }

    public InvigilateMonitorStatusEnum getMonitorStatus() {
        return monitorStatus;
    }

    public void setMonitorStatus(InvigilateMonitorStatusEnum monitorStatus) {
        this.monitorStatus = monitorStatus;
    }


}