package com.qmth.themis.business.dto.response;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.themis.business.cache.ExamRecordCacheUtil;
import com.qmth.themis.business.cache.bean.ExamActivityCacheBean;
import com.qmth.themis.business.cache.bean.ExamCacheBean;
import com.qmth.themis.business.cache.bean.ExamCourseCacheBean;
import com.qmth.themis.business.cache.bean.ExamStudentCacheBean;
import com.qmth.themis.business.constant.SystemConstant;
import com.qmth.themis.business.enums.EntryAuthenticationPolicyEnum;
import com.qmth.themis.business.enums.ExamModeEnum;
import com.qmth.themis.business.enums.HardwareTestEnum;
import com.qmth.themis.business.enums.MonitorVideoSourceEnum;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;

/**
 * @Description: 考试场次dto
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2020/8/3
 */
public class TEExamActivityDto implements Serializable {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(name = "考试场次id")
    private Long id;//考试id

//    @ApiModelProperty(name = "考试场次代码")
//    private String code;//考试场次代码
//
//    @JsonSerialize(using = ToStringSerializer.class)
//    @ApiModelProperty(name = "考生id")
//    private Long examStudentId;//考生id
//
//    @ApiModelProperty(name = "科目代码")
//    private String courseCode;//科目代码
//
//    @ApiModelProperty(name = "科目名称")
//    private String courseName;//科目名称

    @ApiModelProperty(name = "提前多长时间开始候考(时间戳)")
    private Long prepareTime;

    @ApiModelProperty(name = "最短考试时长")
    private Long minStartTime;

    @ApiModelProperty(name = "最大考试时长")
    private Long maxStartTime;

    @ApiModelProperty(name = "强制交卷时间")
    private Long maxFinishTime;

    @ApiModelProperty(name = "监控源")
    private String monitorVideoSourceStr;

    @ApiModelProperty(name = "转录源")
    private String monitorRecordStr;

    @ApiModelProperty(name = "监控源集合")
    private List<MonitorStreamDto> monitorVideoSource;

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

    @ApiModelProperty(name = "允许开考开放时长，相当于迟到时间")
    private Integer activityOpeningSeconds;//允许开考开放时长(分钟)，相当于迟到时间

    @ApiModelProperty(name = "提前多长时间开始候考")
    private Integer prepareSeconds;//提前多长时间开始候考(分钟)

    @ApiModelProperty(name = "提前多长时间开始候考")
    private Integer activityPrepareSeconds;//提前多长时间开始候考(分钟)

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

    @ApiModelProperty(name = "最大考试时长")
    private Integer maxDurationSeconds;//最大考试时长

    @ApiModelProperty(name = "最大考试时长")
    private Integer activityMaxDurationSeconds;//最大考试时长

    @ApiModelProperty(name = "允许考试次数")
    private Integer examCount;//允许考试次数

    @ApiModelProperty(name = "是否在结束时间集中强制收卷，0：不强制，1：强制")
    private Integer forceFinish;//是否在结束时间集中强制收卷，0：不强制，1：强制

    @ApiModelProperty(name = "开考身份验证策略，off：关闭，face_verify_optional：非强制人脸验证，face_verify_force：强制人脸验证，liveness_verify：活体验证")
    private String entryAuthenticationPolicy;//开考身份验证策略，off：关闭，face_verify_optional：非强制人脸验证，face_verify_force：强制人脸验证，liveness_verify：活体验证

    @ApiModelProperty(name = "考试过程中人脸检测是否开启，0：不开启，1：开启")
    private Integer inProcessFaceVerify;//考试过程中人脸检测是否开启，0：不开启，1：开启

    @ApiModelProperty(name = "考试过程中人脸检测是否忽略陌生人 ，0：不忽略，1：忽略")
    private Integer inProcessFaceStrangerIgnore;//考试过程中人脸检测是否忽略陌生人 ，0：不忽略，1：忽略

    @ApiModelProperty(name = "考试过程中是否启用活体检测 ，0：不启用，1：启用")
    private Integer inProcessLivenessVerify;//考试过程中是否启用活体检测 ，0：不启用，1：启用

    @ApiModelProperty(value = "考试过程中是否启用真实性检测，0：不启用，1：启用")
    private Integer inProcessRealnessVerify;

    @ApiModelProperty(name = "考试过程中活体检测间隔时间")
    private String inProcessLivenessFixedRangeStr;

    @ApiModelProperty(name = "考试过程中活体检测间隔时间集合")
    private List<Integer> inProcessLivenessFixedRange;//考试过程中活体检测间隔时间

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

    @ApiModelProperty(name = "是否允许使用摄像头拍照答题，0：不允许，1：允许")
    private Integer cameraPhotoUpload;//是否允许使用摄像头拍照答题，0：不允许，1：允许

    @ApiModelProperty(name = "考场开始时间")
    private Long startTime;//考场开始时间

    @ApiModelProperty(name = "考场结束时间")
    private Long finishTime;//考场结束时间

    @ApiModelProperty(name = "剩余考试次数")
    private Integer leftExamCount;//剩余考试次数

    @ApiModelProperty(name = "是否允许使用移动端拍照答题，0：不开启，1：开启")
    private Integer mobilePhotoUpload;//是否允许使用移动端拍照答题，0：不开启，1：开启

    @ApiModelProperty(name = "客户端监控是否启用音频与麦克风")
    private Boolean monitorAudioEnable = false;//客户端监控是否启用音频与麦克风

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(name = "考试id")
    private Long examId;//考试id

    @ApiModelProperty(name = "硬件检测集合")
    private List<String> hardwareTest;//硬件检测

    @ApiModelProperty(name = "考前须知")
    private String preNotice;//考前须知

    @ApiModelProperty(name = "考试须知阅读时长")
    private Integer preNoticeStaySeconds;//考试须知阅读时长(秒)

    public TEExamActivityDto() {

    }

    public TEExamActivityDto(ExamCacheBean ec, ExamActivityCacheBean examActivityCacheBean, ExamStudentCacheBean examStudentCacheBean, Long examStudentId, ExamCourseCacheBean examCourseCacheBean,
                             Long recordId, String prefix, boolean cache) {
        Long startTime = null, endTime = null;
        Integer openingSeconds = null, minDurationSeconds = null, maxDurationSeconds = null, forceFinish = null,
                cameraPhotoUpload = null, mobilePhotoUpload = null, inProcessFaceStrangerIgnore = null, inProcessFaceVerify = null,
                inProcessLivenessVerify = null, inProcessRealnessVerify = null;
        String entryAuthenticationPolicy = null, inProcessLivenessFixedRange = null, inProcessLivenessJudgePolicy = null,
                monitorVideoSource = null, monitorRecord = null;
        if (cache) {
            startTime = ExamRecordCacheUtil.getStartTime(recordId);
            endTime = ExamRecordCacheUtil.getEndTime(recordId);
            openingSeconds = ExamRecordCacheUtil.getOpeningSeconds(recordId);
            minDurationSeconds = ExamRecordCacheUtil.getMinDurationSeconds(recordId);
            maxDurationSeconds = ExamRecordCacheUtil.getMaxDurationSeconds(recordId);
            forceFinish = ExamRecordCacheUtil.getForceFinish(recordId);
            cameraPhotoUpload = ExamRecordCacheUtil.getCameraPhotoUpload(recordId);
            mobilePhotoUpload = ExamRecordCacheUtil.getMobilePhotoUpload(recordId);
            entryAuthenticationPolicy = ExamRecordCacheUtil.getEntryAuthenticationPolicy(recordId);
            inProcessFaceStrangerIgnore = ExamRecordCacheUtil.getInProcessFaceStrangerIgnore(recordId);
            inProcessLivenessFixedRange = ExamRecordCacheUtil.getInProcessLivenessFixedRange(recordId);
            inProcessLivenessJudgePolicy = ExamRecordCacheUtil.getInProcessLivenessJudgePolicy(recordId);
            monitorVideoSource = ExamRecordCacheUtil.getMonitorVideoSource(recordId);
            inProcessFaceVerify = ExamRecordCacheUtil.getInProcessFaceVerifyStatus(recordId);
            inProcessLivenessVerify = ExamRecordCacheUtil.getInProcessLivenessVerifyStatus(recordId);
            inProcessRealnessVerify = ExamRecordCacheUtil.getInProcessRealnessVerifyStatus(recordId);
            monitorRecord = ExamRecordCacheUtil.getMonitorRecord(recordId);
        } else {
            startTime = examActivityCacheBean.getStartTime();
            endTime = examActivityCacheBean.getFinishTime();
            openingSeconds = examActivityCacheBean.getOpeningSeconds();
            minDurationSeconds = ec.getMinDurationSeconds();
            maxDurationSeconds = examActivityCacheBean.getMaxDurationSeconds();
            forceFinish = ec.getForceFinish();
            cameraPhotoUpload = ec.getCameraPhotoUpload();
            mobilePhotoUpload = examCourseCacheBean.getMobilePhotoUpload();
            entryAuthenticationPolicy = ec.getEntryAuthenticationPolicy().name();
            inProcessFaceStrangerIgnore = ec.getInProcessFaceStrangerIgnore();
            inProcessLivenessFixedRange = ec.getInProcessLivenessFixedRange();
            inProcessLivenessJudgePolicy = ec.getInProcessLivenessJudgePolicy().name();
            monitorVideoSource = ec.getMonitorVideoSource();
            inProcessFaceVerify = ec.getInProcessFaceVerify();
            inProcessLivenessVerify = ec.getInProcessLivenessVerify();
            inProcessRealnessVerify = ec.getInProcessRealnessVerify();
            monitorRecord = ec.getMonitorRecord();
        }
        this.id = examActivityCacheBean.getId();
//        this.code = examActivityCacheBean.getCode();
//        this.examStudentId = examStudentId;
//        this.courseCode = examStudentCacheBean.getCourseCode();
//        this.courseName = examStudentCacheBean.getCourseName();
        if (Objects.nonNull(examActivityCacheBean.getPrepareSeconds())) {
            this.prepareTime = startTime - (examActivityCacheBean.getPrepareSeconds() * 1000);
        } else if (Objects.nonNull(ec.getPrepareSeconds())) {
            this.prepareTime = startTime - (ec.getPrepareSeconds() * 1000);
        }
        if (Objects.nonNull(startTime)) {
            this.minStartTime = startTime;
        } else {
            this.minStartTime = ec.getStartTime();
        }
        if (Objects.nonNull(openingSeconds)) {
            openingSeconds = openingSeconds.intValue() == 0 ? SystemConstant.DEFAULT_OPENING_SECONDS : openingSeconds;
            this.maxStartTime = startTime + (openingSeconds * 1000);
        } else if (Objects.nonNull(ec.getMaxDurationSeconds())) {
            Integer openingSecondsTemp = ec.getOpeningSeconds();
            openingSecondsTemp = Objects.nonNull(openingSecondsTemp) && openingSecondsTemp.intValue() == 0 ? SystemConstant.DEFAULT_OPENING_SECONDS : openingSecondsTemp;
            this.maxStartTime = startTime + (openingSecondsTemp * 1000);
        }
        if (Objects.equals(ec.getMode(), ExamModeEnum.ANYTIME) || (Objects.equals(ec.getMode(), ExamModeEnum.TOGETHER) && forceFinish == 0)) {
            this.maxFinishTime = null;
        } else {
            this.maxFinishTime = Objects.nonNull(endTime) ? endTime : examActivityCacheBean.getFinishTime();
        }
        this.cameraPhotoUpload = cameraPhotoUpload;
        this.entryAuthenticationPolicy = entryAuthenticationPolicy;
        this.inProcessFaceVerify = inProcessFaceVerify;
        this.inProcessFaceStrangerIgnore = inProcessFaceStrangerIgnore;
        this.inProcessLivenessVerify = inProcessLivenessVerify;
        this.inProcessRealnessVerify = inProcessRealnessVerify;
        if (Objects.nonNull(monitorVideoSource) && !Objects.equals(monitorVideoSource.trim().replaceAll(" ", ""), "")) {
            Map<String, String> monitorRecordMap = null;
            if (Objects.nonNull(monitorRecord) && !Objects.equals(monitorRecord.trim().replaceAll(" ", ""), "")) {
                List<String> monitorRecordList = Arrays.asList(monitorRecord.trim().toUpperCase().split(","));
                monitorRecordMap = monitorRecordList.stream()
                        .collect(Collectors.toMap(Function.identity(), s -> s));
            }

            List<String> videoSources = Arrays.asList(monitorVideoSource.trim().toUpperCase().split(","));
            List<MonitorStreamDto> monitorStreamDtoList = new ArrayList<>();
            Map<String, String> finalMonitorRecordMap = monitorRecordMap;
            videoSources.forEach(s -> {
                if (Objects.isNull(finalMonitorRecordMap) || finalMonitorRecordMap.size() == 0) {
                    monitorStreamDtoList.add(new MonitorStreamDto(MonitorVideoSourceEnum.valueOf(s), SystemConstant.setStreamId(prefix, recordId, MonitorVideoSourceEnum.valueOf(s)), null));
                } else {
                    String monitorRecordStr = finalMonitorRecordMap.get(s);
                    monitorStreamDtoList.add(new MonitorStreamDto(MonitorVideoSourceEnum.valueOf(s), SystemConstant.setStreamId(prefix, recordId, MonitorVideoSourceEnum.valueOf(s)), Objects.nonNull(monitorRecordStr) ? SystemConstant.setStreamId(prefix, recordId, MonitorVideoSourceEnum.valueOf(s)) : null));
                }
            });
            this.setMonitorVideoSource(monitorStreamDtoList);
            //加入monitorAudioEnable逻辑
            if (monitorVideoSource.toUpperCase().contains(MonitorVideoSourceEnum.CLIENT_SCREEN.name()) || monitorVideoSource.toUpperCase().contains(MonitorVideoSourceEnum.CLIENT_CAMERA.name())) {
                this.monitorAudioEnable = true;
            }
            //加入hardwareTest逻辑
            if (monitorVideoSource.toUpperCase().contains(MonitorVideoSourceEnum.CLIENT_CAMERA.name()) || (Objects.nonNull(this.getEntryAuthenticationPolicy()) && (Objects.equals(this.getEntryAuthenticationPolicy(), EntryAuthenticationPolicyEnum.LIVENESS_VERIFY.name()) || Objects.equals(this.getEntryAuthenticationPolicy(), EntryAuthenticationPolicyEnum.FACE_VERIFY_FORCE.name()))) || (Objects.nonNull(this.getCameraPhotoUpload()) && this.getCameraPhotoUpload() == 1)
                    || Objects.nonNull(this.getInProcessFaceVerify()) && this.getInProcessFaceVerify() == 1
                    || Objects.nonNull(this.getInProcessLivenessVerify()) && this.getInProcessLivenessVerify() == 1) {
                if (Objects.isNull(this.hardwareTest)) {
                    this.hardwareTest = new ArrayList<>();
                }
                this.hardwareTest.add(HardwareTestEnum.CAMERA.name());
                //取course缓存
                if ((Objects.nonNull(examCourseCacheBean) && Objects.nonNull(examCourseCacheBean.getHasAudio()) && examCourseCacheBean.getHasAudio() == 1)
                        || monitorVideoSource.toUpperCase().contains(MonitorVideoSourceEnum.CLIENT_CAMERA.name())) {
                    this.hardwareTest.add(HardwareTestEnum.AUDIOPLAY.name());
                }
            }
        } else if ((Objects.nonNull(this.getEntryAuthenticationPolicy()) && (
                Objects.equals(this.getEntryAuthenticationPolicy(),
                        EntryAuthenticationPolicyEnum.LIVENESS_VERIFY.name()) || Objects
                        .equals(this.getEntryAuthenticationPolicy(),
                                EntryAuthenticationPolicyEnum.FACE_VERIFY_FORCE.name()))) || (
                Objects.nonNull(this.getCameraPhotoUpload()) && this.getCameraPhotoUpload() == 1)
                || Objects.nonNull(this.getInProcessFaceVerify()) && this.getInProcessFaceVerify() == 1
                || Objects.nonNull(this.getInProcessLivenessVerify()) && this.getInProcessLivenessVerify() == 1) {
            if (Objects.isNull(this.hardwareTest)) {
                this.hardwareTest = new ArrayList<>();
            }
            this.hardwareTest.add(HardwareTestEnum.CAMERA.name());
        } else {
            this.setMonitorVideoSource(null);
        }
        this.openingSeconds = Objects.nonNull(openingSeconds) ? openingSeconds : ec.getOpeningSeconds();
        this.activityOpeningSeconds = openingSeconds;
        this.prepareSeconds = Objects.nonNull(examActivityCacheBean.getPrepareSeconds()) ? examActivityCacheBean.getPrepareSeconds() : ec.getPrepareSeconds();
        this.activityPrepareSeconds = examActivityCacheBean.getPrepareSeconds();
        this.minDurationSeconds = minDurationSeconds;
        this.maxDurationSeconds = Objects.nonNull(maxDurationSeconds) ? maxDurationSeconds : ec.getMaxDurationSeconds();
        this.activityMaxDurationSeconds = maxDurationSeconds;
        this.examCount = ec.getExamCount();
        this.forceFinish = forceFinish;
        if (Objects.nonNull(inProcessLivenessFixedRange)) {
            String[] longs = inProcessLivenessFixedRange.trim().split(",");
            List inProcessLivenessFixedRangeList = new ArrayList();
            for (int i = 0; i < longs.length; i++) {
                Integer integer = Integer.valueOf(longs[i].trim());
                inProcessLivenessFixedRangeList.add(integer);
            }
            if (Objects.equals(inProcessLivenessFixedRange.toString().trim().replaceAll(" ", ""), "")) {
                this.setInProcessLivenessFixedRange(null);
            } else {
                this.setInProcessLivenessFixedRange(inProcessLivenessFixedRangeList);
            }
        }
        this.inProcessLivenessJudgePolicy = inProcessLivenessJudgePolicy;
        this.startTime = startTime;
        this.finishTime = endTime;
        this.leftExamCount = (ec.getExamCount().intValue() - examStudentCacheBean.getAlreadyExamCount().intValue()) < 0 ? 0 : ec.getExamCount().intValue() - examStudentCacheBean.getAlreadyExamCount().intValue();
        this.mobilePhotoUpload = mobilePhotoUpload;
        this.examId = ec.getId();
        this.preNotice = ec.getPreNotice();
        this.preNoticeStaySeconds = ec.getPreNoticeStaySeconds();
    }

    public void setTeExamActivityDto(TEExamActivityDto teExamActivityDto) {
        setId(teExamActivityDto.getId());
        setPrepareTime(teExamActivityDto.getPrepareTime());
        setMinStartTime(teExamActivityDto.getMinStartTime());
        setMaxStartTime(teExamActivityDto.getMaxStartTime());
        setMaxFinishTime(teExamActivityDto.getMaxFinishTime());
        setMonitorVideoSourceStr(teExamActivityDto.getMonitorVideoSourceStr());
        setMonitorVideoSource(teExamActivityDto.getMonitorVideoSource());
        setMonitorRecordStr(teExamActivityDto.getMonitorRecordStr());
        setOpeningSeconds(teExamActivityDto.getOpeningSeconds());
        setActivityOpeningSeconds(teExamActivityDto.getActivityOpeningSeconds());
        setPrepareSeconds(teExamActivityDto.getPrepareSeconds());
        setActivityPrepareSeconds(teExamActivityDto.getActivityPrepareSeconds());
        setMinDurationSeconds(teExamActivityDto.getMinDurationSeconds());
        setMaxDurationSeconds(teExamActivityDto.getMaxDurationSeconds());
        setActivityMaxDurationSeconds(teExamActivityDto.getActivityMaxDurationSeconds());
        setExamCount(teExamActivityDto.getExamCount());
        setForceFinish(teExamActivityDto.getForceFinish());
        setEntryAuthenticationPolicy(teExamActivityDto.getEntryAuthenticationPolicy());
        setInProcessFaceVerify(teExamActivityDto.getInProcessFaceVerify());
        setInProcessFaceStrangerIgnore(teExamActivityDto.getInProcessFaceStrangerIgnore());
        setInProcessLivenessVerify(teExamActivityDto.getInProcessLivenessVerify());
        setInProcessLivenessFixedRangeStr(teExamActivityDto.getInProcessLivenessFixedRangeStr());
        setInProcessLivenessFixedRange(teExamActivityDto.getInProcessLivenessFixedRange());
        setInProcessLivenessJudgePolicy(teExamActivityDto.getInProcessLivenessJudgePolicy());
        setCameraPhotoUpload(teExamActivityDto.getCameraPhotoUpload());
        setStartTime(teExamActivityDto.getStartTime());
        setFinishTime(teExamActivityDto.getFinishTime());
        setLeftExamCount(teExamActivityDto.getLeftExamCount());
        setMobilePhotoUpload(teExamActivityDto.getMobilePhotoUpload());
        setMonitorAudioEnable(teExamActivityDto.getMonitorAudioEnable());
        setExamId(teExamActivityDto.getExamId());
        setHardwareTest(teExamActivityDto.getHardwareTest());
        setPreNotice(teExamActivityDto.getPreNotice());
        setPreNoticeStaySeconds(teExamActivityDto.getPreNoticeStaySeconds());
    }

    public String getMonitorRecordStr() {
        return monitorRecordStr;
    }

    public void setMonitorRecordStr(String monitorRecordStr) {
        this.monitorRecordStr = monitorRecordStr;
    }

    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 Integer getInProcessRealnessVerify() {
        return inProcessRealnessVerify;
    }

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

    public Long getExamId() {
        return examId;
    }

    public void setExamId(Long examId) {
        this.examId = examId;
    }

    public Boolean getMonitorAudioEnable() {
        return monitorAudioEnable;
    }

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

    public List<String> getHardwareTest() {
        return hardwareTest;
    }

    public void setHardwareTest(List<String> hardwareTest) {
        this.hardwareTest = hardwareTest;
    }

    public Integer getMobilePhotoUpload() {
        return mobilePhotoUpload;
    }

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

    public Integer getLeftExamCount() {
        return leftExamCount;
    }

    public void setLeftExamCount(Integer leftExamCount) {
        this.leftExamCount = leftExamCount;
    }

    public String getMonitorVideoSourceStr() {
        return monitorVideoSourceStr;
    }

    public void setMonitorVideoSourceStr(String monitorVideoSourceStr) {
        this.monitorVideoSourceStr = monitorVideoSourceStr;
    }

    public String getInProcessLivenessFixedRangeStr() {
        return inProcessLivenessFixedRangeStr;
    }

    public void setInProcessLivenessFixedRangeStr(String inProcessLivenessFixedRangeStr) {
        this.inProcessLivenessFixedRangeStr = inProcessLivenessFixedRangeStr;
    }

    public Long getPrepareTime() {
        return prepareTime;
    }

    public void setPrepareTime(Long prepareTime) {
        this.prepareTime = prepareTime;
    }

    public Long getMinStartTime() {
        return minStartTime;
    }

    public void setMinStartTime(Long minStartTime) {
        this.minStartTime = minStartTime;
    }

    public Long getMaxStartTime() {
        return maxStartTime;
    }

    public void setMaxStartTime(Long maxStartTime) {
        this.maxStartTime = maxStartTime;
    }

    public Long getMaxFinishTime() {
        return maxFinishTime;
    }

    public void setMaxFinishTime(Long maxFinishTime) {
        this.maxFinishTime = maxFinishTime;
    }

    public List<MonitorStreamDto> getMonitorVideoSource() {
        return monitorVideoSource;
    }

    public void setMonitorVideoSource(List<MonitorStreamDto> monitorVideoSource) {
        this.monitorVideoSource = monitorVideoSource;
    }

    public Long getId() {
        return id;
    }

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

//    public String getCode() {
//        return code;
//    }
//
//    public void setCode(String code) {
//        this.code = code;
//    }
//
//    public Long getExamStudentId() {
//        return examStudentId;
//    }
//
//    public void setExamStudentId(Long examStudentId) {
//        this.examStudentId = examStudentId;
//    }
//
//    public String getCourseCode() {
//        return courseCode;
//    }
//
//    public void setCourseCode(String courseCode) {
//        this.courseCode = courseCode;
//    }
//
//    public String getCourseName() {
//        return courseName;
//    }
//
//    public void setCourseName(String courseName) {
//        this.courseName = courseName;
//    }

    public Integer getOpeningSeconds() {
        return openingSeconds;
    }

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

    public Integer getActivityOpeningSeconds() {
        return activityOpeningSeconds;
    }

    public void setActivityOpeningSeconds(Integer activityOpeningSeconds) {
        this.activityOpeningSeconds = activityOpeningSeconds;
    }

    public Integer getPrepareSeconds() {
        return prepareSeconds;
    }

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

    public Integer getActivityPrepareSeconds() {
        return activityPrepareSeconds;
    }

    public void setActivityPrepareSeconds(Integer activityPrepareSeconds) {
        this.activityPrepareSeconds = activityPrepareSeconds;
    }

    public Integer getMinDurationSeconds() {
        return minDurationSeconds;
    }

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

    public Integer getMaxDurationSeconds() {
        return maxDurationSeconds;
    }

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

    public Integer getActivityMaxDurationSeconds() {
        return activityMaxDurationSeconds;
    }

    public void setActivityMaxDurationSeconds(Integer activityMaxDurationSeconds) {
        this.activityMaxDurationSeconds = activityMaxDurationSeconds;
    }

    public void setInProcessLivenessFixedRange(List<Integer> inProcessLivenessFixedRange) {
        this.inProcessLivenessFixedRange = inProcessLivenessFixedRange;
    }

    public Integer getExamCount() {
        return examCount;
    }

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

    public Integer getForceFinish() {
        return forceFinish;
    }

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

    public String getEntryAuthenticationPolicy() {
        return entryAuthenticationPolicy;
    }

    public void setEntryAuthenticationPolicy(String 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 List<Integer> getInProcessLivenessFixedRange() {
        return inProcessLivenessFixedRange;
    }

    public String getInProcessLivenessJudgePolicy() {
        return inProcessLivenessJudgePolicy;
    }

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

    public Integer getCameraPhotoUpload() {
        return cameraPhotoUpload;
    }

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

    public Long getStartTime() {
        return startTime;
    }

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

    public Long getFinishTime() {
        return finishTime;
    }

    public void setFinishTime(Long finishTime) {
        this.finishTime = finishTime;
    }
}
