package com.bocloud.ims.entity.middleware;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.PK;
import com.bocloud.entity.annotations.Table;
import com.bocloud.entity.bean.GenericEntity;
import com.bocloud.entity.meta.PKStrategy;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * Created by liuyuanyuan on 2020/3/11 15:08
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Table("cms_queue")
public class CmsQueue extends GenericEntity {
    @PK(PKStrategy.AUTO)
    private Long id;// ID
    @Column("name")
    private String name;
    @JSONField(name = "auto_delete")
    @Column("auto_delete")
    private Boolean autoDelete;
    @Column("durable")
    private Boolean durable;
    @Column("arguments")
    private JSONObject arguments;
    @Column("node")
    private String node;
    @Column("mq_id")
    private Long mqId;
    @Column("vhost")
    private String vhost;
    private String state;
    @JSONField(name = "message_bytes")
    private Long messageBytes;
    @JSONField(name = "message_bytes_ready")
    private Long messageBytesReady;
    @JSONField(name = "message_bytes_unacknowledged")
    private Long messageBytesUnacknowledged;
    @JSONField(name = "message_stats")
    private JSONObject messageStats;
    private List<JSONObject> channels;
    @JSONField(name = "consumer_details")
    private List<JSONObject> consumerDetails;
    private Long consumers;
    @JSONField(name = "consumer_utilisation")
    private Long consumerUtilisation;
    private Long publishInRate;
    private Long deliverGetRate;
    private Long ackRate;
}
