package com.elab.mq.rocket.msg.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * 消费者消息应用状态表
 *
 * @author liukx
 * @Date 2019-07-18 15:04
 */
@Table(name = "rmq_consumer")
@ApiModel(description = "消费者消息应用状态表 实体")
public class RmqConsumerEntity {

    /**
     * Id
     */
    @Id
    @ApiModelProperty(name = "id", value = "主键")
    private Integer id;

    /**
     * 生产者消息id
     */
    @Column(name = "msg_id")
    @ApiModelProperty(name = "msgId", value = "消息编号")
    private String msgId;

    /**
     * 生产者消息id
     */
    @Column(name = "msg_key")
    @ApiModelProperty(name = "msgKey", value = "唯一的消息key")
    private String msgKey;

    /**
     * 模块名称
     */
    @Column(name = "consuemr_group")
    @ApiModelProperty(name = "consuemrGroup", value = "模块名称")
    private String consuemrGroup;

    /**
     * 生产者ip
     */
    @Column(name = "consumer_ip")
    @ApiModelProperty(name = "consumerIp", value = "生产者ip")
    private String consumerIp;

    /**
     * topic名称
     */
    @Column(name = "topic")
    @ApiModelProperty(name = "topic", value = "topic名称")
    private String topic;

    /**
     * 消费者状态1成功-1失败
     */
    @Column(name = "consumer_status")
    @ApiModelProperty(name = "consumerStatus", value = "消费者状态1成功-1失败")
    private Integer consumerStatus;

    /**
     * 重试次数
     */
    @Column(name = "retry_count")
    @ApiModelProperty(name = "retryCount", value = "重试次数")
    private Integer retryCount;

    /**
     * 创建时间
     */
    @Column(name = "created")
    @ApiModelProperty(name = "created", value = "创建时间")
    private Date created;

    /**
     * 修改时间
     */
    @Column(name = "updated")
    @ApiModelProperty(name = "updated", value = "修改时间")
    private Date updated;


    /**
     * 获取: Id
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置: Id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取: 生产者消息id
     */
    public String getMsgKey() {
        return msgKey;
    }

    /**
     * 设置: 生产者消息id
     */
    public void setMsgKey(String msgKey) {
        this.msgKey = msgKey;
    }

    /**
     * 获取: 模块名称
     */
    public String getConsuemrGroup() {
        return consuemrGroup;
    }

    /**
     * 设置: 模块名称
     */
    public void setConsuemrGroup(String consuemrGroup) {
        this.consuemrGroup = consuemrGroup;
    }

    /**
     * 获取: 生产者ip
     */
    public String getConsumerIp() {
        return consumerIp;
    }

    /**
     * 设置: 生产者ip
     */
    public void setConsumerIp(String consumerIp) {
        this.consumerIp = consumerIp;
    }

    /**
     * 获取: topic名称
     */
    public String getTopic() {
        return topic;
    }

    /**
     * 设置: topic名称
     */
    public void setTopic(String topic) {
        this.topic = topic;
    }

    /**
     * 获取: 消费者状态1成功-1失败
     */
    public Integer getConsumerStatus() {
        return consumerStatus;
    }

    /**
     * 设置: 消费者状态1成功-1失败
     */
    public void setConsumerStatus(Integer consumerStatus) {
        this.consumerStatus = consumerStatus;
    }

    /**
     * 获取: 重试次数
     */
    public Integer getRetryCount() {
        return retryCount;
    }

    /**
     * 设置: 重试次数
     */
    public void setRetryCount(Integer retryCount) {
        this.retryCount = retryCount;
    }

    /**
     * 获取: 创建时间
     */
    public Date getCreated() {
        return created;
    }

    /**
     * 设置: 创建时间
     */
    public void setCreated(Date created) {
        this.created = created;
    }

    /**
     * 获取: 修改时间
     */
    public Date getUpdated() {
        return updated;
    }

    /**
     * 设置: 修改时间
     */
    public void setUpdated(Date updated) {
        this.updated = updated;
    }

    public String getMsgId() {
        return msgId;
    }

    public void setMsgId(String msgId) {
        this.msgId = msgId;
    }

    @Override
    public String toString() {
        return "RmqConsumerEntity{" +
                "id=" + id +
                ", msgId='" + msgId + '\'' +
                ", msgKey='" + msgKey + '\'' +
                ", consuemrGroup='" + consuemrGroup + '\'' +
                ", consumerIp='" + consumerIp + '\'' +
                ", topic='" + topic + '\'' +
                ", consumerStatus=" + consumerStatus +
                ", retryCount=" + retryCount +
                ", created=" + created +
                ", updated=" + updated +
                '}';
    }
}
