package com.qmth.themis.business.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.themis.business.enums.MessageTypeEnum;
import com.qmth.themis.business.enums.MonitorVideoSourceEnum;
import com.qmth.themis.business.util.UidUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * <p>
 * 监控观看地址和通话申请表
 * </p>
 *
 * @author wangliang
 * @since 2023-10-26
 */
@ApiModel(value = "TIeExamMediaLog对象", description = "多媒体日志表")
public class TIeExamMediaLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

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

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

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

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

    @ApiModelProperty(value = "状态")
    private MonitorVideoSourceEnum source;

    @ApiModelProperty(value = "创建时间")
    private Long createTime;

    @ApiModelProperty(value = "类型")
    private MessageTypeEnum type;

    @ApiModelProperty(value = "内容")
    private String content;

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

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

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

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

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

    public TIeExamMediaLog() {

    }

    public TIeExamMediaLog(Long examId, Long examActivityId, Long examStudentId, Long examRecordId, MonitorVideoSourceEnum source,
                           String content, Long startTime, Long callTime, Long endTime, Long formUserId, Long receiveUserId) {
        this.id = UidUtil.nextId();
        this.examId = examId;
        this.examActivityId = examActivityId;
        this.examStudentId = examStudentId;
        this.examRecordId = examRecordId;
        this.source = source;
        this.type = MessageTypeEnum.MEDIA;
        this.content = content;
        this.startTime = startTime;
        this.callTime = callTime;
        this.endTime = endTime;
        this.formUserId = formUserId;
        this.receiveUserId = receiveUserId;
        this.createTime = System.currentTimeMillis();
    }

    public Long getCallTime() {
        return callTime;
    }

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

    public Long getId() {
        return id;
    }

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

    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 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 Long getCreateTime() {
        return createTime;
    }

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

    public MessageTypeEnum getType() {
        return type;
    }

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

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    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 getFormUserId() {
        return formUserId;
    }

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

    public Long getReceiveUserId() {
        return receiveUserId;
    }

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