package com.qmth.themis.business.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.themis.business.base.BaseEntity;
import com.qmth.themis.business.enums.ExceptionEnum;
import com.qmth.themis.business.enums.MonitorCallStatusSourceEnum;
import com.qmth.themis.business.enums.MonitorStatusSourceEnum;
import com.qmth.themis.business.enums.MonitorVideoSourceEnum;
import com.qmth.themis.business.util.UidUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @Description: 监考 监控通话申请
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2020/8/7
 */
@ApiModel(value = "t_ie_exam_invigilate_call", description = "监控观看地址和通话申请")
public class TIeExamInvigilateCall extends BaseEntity {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "考试记录ID")
    @TableField(value = "exam_record_id")
    private Long examRecordId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "考试ID")
    @TableField(value = "exam_id")
    private Long examId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "场次ID")
    @TableField(value = "exam_activity_id")
    private Long examActivityId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "考生ID")
    @TableField(value = "exam_student_id")
    private Long examStudentId;

    @ApiModelProperty(value = "监考视频源")
    @TableField(value = "source")
    private MonitorVideoSourceEnum source;

    @ApiModelProperty(value = "观看地址")
    @TableField(value = "live_url")
    private String liveUrl;

    @ApiModelProperty(value = "状态")
    @TableField(value = "status")
    private MonitorStatusSourceEnum status;

    @ApiModelProperty(value = "异常类型")
    @TableField(value = "type")
    private ExceptionEnum type;

    @ApiModelProperty(value = "通话状态")
    @TableField(value = "call_status")
    private MonitorCallStatusSourceEnum callStatus;

    @ApiModelProperty(value = "房间号")
    @TableField(value = "monitor_key")
    private String monitorKey;

    @TableField(value = "start_time")
    @ApiModelProperty(value = "开始通话时间")
    private Long startTime;

    @TableField(value = "end_time")
    @ApiModelProperty(value = "结束通话时间")
    private Long endTime;

    @ApiModelProperty(value = "来源userId")
    @TableField(exist = false)
    private String sourceUserId;

    public TIeExamInvigilateCall() {

    }

    public TIeExamInvigilateCall(Long examRecordId, MonitorVideoSourceEnum source, String liveUrl,
                                 MonitorStatusSourceEnum status, String monitorKey
    ) {
        setId(UidUtil.nextId());
        this.examRecordId = examRecordId;
        this.source = source;
        this.liveUrl = liveUrl;
        this.status = status;
        this.monitorKey = monitorKey;
    }

    public String getSourceUserId() {
        return sourceUserId;
    }

    public void setSourceUserId(String sourceUserId) {
        this.sourceUserId = sourceUserId;
    }

    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 MonitorCallStatusSourceEnum getCallStatus() {
        return callStatus;
    }

    public void setCallStatus(MonitorCallStatusSourceEnum callStatus) {
        this.callStatus = callStatus;
    }

    public String getMonitorKey() {
        return monitorKey;
    }

    public void setMonitorKey(String monitorKey) {
        this.monitorKey = monitorKey;
    }

    public ExceptionEnum getType() {
        return type;
    }

    public void setType(ExceptionEnum type) {
        this.type = type;
    }

    public Long getExamRecordId() {
        return examRecordId;
    }

    public void setExamRecordId(Long examRecordId) {
        this.examRecordId = examRecordId;
    }

    public MonitorVideoSourceEnum getSource() {
        return source;
    }

    public void setSource(MonitorVideoSourceEnum source) {
        this.source = source;
    }

    public String getLiveUrl() {
        return liveUrl;
    }

    public void setLiveUrl(String liveUrl) {
        this.liveUrl = liveUrl;
    }

    public MonitorStatusSourceEnum getStatus() {
        return status;
    }

    public void setStatus(MonitorStatusSourceEnum status) {
        this.status = status;
    }

    public Long getExamId() {
        return examId;
    }

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

    public Long getExamActivityId() {
        return examActivityId;
    }

    public void setExamActivityId(Long examActivityId) {
        this.examActivityId = examActivityId;
    }

    public Long getExamStudentId() {
        return examStudentId;
    }

    public void setExamStudentId(Long examStudentId) {
        this.examStudentId = examStudentId;
    }
}
