package com.qmth.themis.business.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
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.util.UidUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * @Description: 监考通知消息记录
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2020/6/25
 */
@ApiModel(value = "t_ie_exam_invigilate_notice", description = "监考通知消息记录")
public class TIeExamInvigilateNotice implements Serializable {

    private static final long serialVersionUID = 1L;

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

    @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_record_id")
    private Long examRecordId;

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

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

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

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

    @ApiModelProperty(value = "发送时间")
    @TableField(value = "send_time")
    private Long sendTime;

    @ApiModelProperty(value = "接收时间")
    @TableField(value = "receive_time")
    private Long receiveTime;

    @ApiModelProperty(value = "发送人名称")
    @TableField(exist = false)
    private String formUserName;

    public TIeExamInvigilateNotice() {

    }

    public TIeExamInvigilateNotice(Long examId, Long examActivityId, Long examRecordId, Long formUserId,Long receiveUserId, MessageTypeEnum type, String content) {
        this.id = UidUtil.nextId();
        this.examId = examId;
        this.examActivityId = examActivityId;
        this.examRecordId = examRecordId;
        this.formUserId = formUserId;
        this.receiveUserId = receiveUserId;
        this.type = type;
        this.content = content;
        this.sendTime = System.currentTimeMillis();
    }

    public String getFormUserName() {
        return formUserName;
    }

    public void setFormUserName(String formUserName) {
        this.formUserName = formUserName;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

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

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

    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 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 getSendTime() {
        return sendTime;
    }

    public void setSendTime(Long sendTime) {
        this.sendTime = sendTime;
    }

    public Long getReceiveTime() {
        return receiveTime;
    }

    public void setReceiveTime(Long receiveTime) {
        this.receiveTime = receiveTime;
    }
}
