package com.qmth.teachcloud.common.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
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.teachcloud.common.base.BaseEntity;
import com.qmth.teachcloud.common.enums.MqTagEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Map;

/**
 * @Description: mq消息
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2020/7/9
 */
@ApiModel(value = "t_m_mq_message", description = "mq消息")
public class TMMqMessage extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "学校id")
    @TableField(value = "school_id")
    private Long schoolId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "机构id")
    @TableField(value = "org_id")
    private Long orgId;

    @ApiModelProperty(value = "消息topic")
    @TableField(value = "topic")
    private String topic;

    @ApiModelProperty(value = "消息tag")
    @TableField(value = "tag")
    private String tag;

    @ApiModelProperty(value = "消息内容")
    @TableField(value = "body")
    private Object body;

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

    @ApiModelProperty(value = "关联业务id")
    @TableField(value = "obj_id")
    private String objId;

    @ApiModelProperty(value = "关联业务名称")
    @TableField(value = "obj_name")
    private String objName;

    @ApiModelProperty(value = "消息ack")
    @TableField(value = "ack")
    private Integer ack;

    @ApiModelProperty(value = "消息序号")
    @TableField(value = "sequence")
    private Integer sequence;

    @ApiModelProperty(value = "扩展类型")
    @TableField(exist = false)
    private Map<String, Object> properties;

    @TableField(value = "properties")
    private String prop;

    @ApiModelProperty(value = "时间戳")
    @TableField(value = "timestamp")
    private Long timestamp;

    public Long getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(Long schoolId) {
        this.schoolId = schoolId;
    }

    public Long getOrgId() {
        return orgId;
    }

    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }

    public String getProp() {
        return prop;
    }

    public void setProp(String prop) {
        this.prop = prop;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getObjId() {
        return objId;
    }

    public void setObjId(String objId) {
        this.objId = objId;
    }

    public String getObjName() {
        return objName;
    }

    public void setObjName(String objName) {
        this.objName = objName;
    }

    public Integer getAck() {
        return ack;
    }

    public void setAck(Integer ack) {
        this.ack = ack;
    }

    public Integer getSequence() {
        return sequence;
    }

    public void setSequence(Integer sequence) {
        this.sequence = sequence;
    }

    public Object getBody() {
        return body;
    }

    public void setBody(Object body) {
        this.body = body;
    }

    public MqTagEnum getType() {
        return type;
    }

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

    public Map<String, Object> getProperties() {
        return properties;
    }

    public void setProperties(Map<String, Object> properties) {
        this.properties = properties;
    }

    public Long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Long timestamp) {
        this.timestamp = timestamp;
    }
}
