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_log", description = "监控观看地址和通话申请日志")
public class TIeExamInvigilateCallLog 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;

    @ApiModelProperty(value = "备注")
    @TableField(value = "remark")
    private String remark;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "发送人id")
    private Long formUserId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "接收人id")
    private Long receiveUserId;

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

    @ApiModelProperty(value = "接通时间")
    private Long callTime;

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

    public TIeExamInvigilateCallLog() {

    }

    public TIeExamInvigilateCallLog(Long examRecordId, MonitorVideoSourceEnum source, String liveUrl,
                                    MonitorStatusSourceEnum status, String monitorKey, MonitorCallStatusSourceEnum callStatus, Long formUserId, Long receiveUserId
    ) {
        setId(UidUtil.nextId());
        setExamRecordId(examRecordId);
        setSource(source);
        setLiveUrl(liveUrl);
        setStatus(status);
        setCallStatus(callStatus);
        setMonitorKey(monitorKey);
        this.formUserId = formUserId;
        this.receiveUserId = receiveUserId;
    }

    public Long getCallTime() {
        return callTime;
    }

    public void setCallTime(Long callTime) {
        this.callTime = callTime;
    }

    public Long getFormUserId() {
        return formUserId;
    }

    public void setFormUserId(Long formUserId) {
        this.formUserId = formUserId;
    }

    public Long getReceiveUserId() {
        return receiveUserId;
    }

    public void setReceiveUserId(Long receiveUserId) {
        this.receiveUserId = receiveUserId;
    }

    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 Long getExamRecordId() {
        return examRecordId;
    }

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

    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;
    }

    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 ExceptionEnum getType() {
        return type;
    }

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

    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 String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
