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.WebsocketStatusEnum;
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 2022-08-22
 */
@ApiModel(value = "TEExamStudentOnlineLog对象", description = "考生上线日志")
public class TEExamStudentOnlineLog implements Serializable {

    private static final long serialVersionUID = 1L;

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

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

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

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

    @ApiModelProperty(value = "类型，ON_LINE：上线，OFF_LINE：下线")
    private WebsocketStatusEnum type;

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

    public TEExamStudentOnlineLog(Long studentId, Long examStudentId, Long examRecordId, WebsocketStatusEnum type, Long createTime) {
        this.id = UidUtil.nextId();
        this.studentId = studentId;
        this.examStudentId = examStudentId;
        this.examRecordId = examRecordId;
        this.type = type;
        this.createTime = createTime;
    }

    public TEExamStudentOnlineLog() {

    }

    public Long getId() {
        return id;
    }

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

    public Long getStudentId() {
        return studentId;
    }

    public void setStudentId(Long studentId) {
        this.studentId = studentId;
    }

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

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

    public Long getCreateTime() {
        return createTime;
    }

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