package com.yihu.hos.models;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

/**
 * @created Airhead 2016/8/8.
 */
@Document(collection = "businessLog")
public class BusinessLog {
    @Id
    private String id;
    @Indexed
    private String exchangeId;
    private String correlationId;
    private String transactionKey;
    @Indexed
    private String routeId;
    @Indexed
    private String breadcrumbId;
    private Integer totalServers;
    private String camelContextId;
    private String body;
    private Integer bodyLength;
    private String fireTimeSource;

    //@Indexed(name = "fireTime_1", expireAfterSeconds = 30)
    @Indexed
    private Date fireTime;  //后期建议转成TTL

    public String getId() {
        return id;
    }

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

    public String getExchangeId() {
        return exchangeId;
    }

    public void setExchangeId(String exchangeId) {
        this.exchangeId = exchangeId;
    }

    public String getCorrelationId() {
        return correlationId;
    }

    public void setCorrelationId(String correlationId) {
        this.correlationId = correlationId;
    }

    public String getTransactionKey() {
        return transactionKey;
    }

    public void setTransactionKey(String transactionKey) {
        this.transactionKey = transactionKey;
    }

    public String getRouteId() {
        return routeId;
    }

    public void setRouteId(String routeId) {
        this.routeId = routeId;
    }

    public String getBreadcrumbId() {
        return breadcrumbId;
    }

    public void setBreadcrumbId(String breadcrumbId) {
        this.breadcrumbId = breadcrumbId;
    }

    public String getCamelContextId() {
        return camelContextId;
    }

    public void setCamelContextId(String camelContextId) {
        this.camelContextId = camelContextId;
    }

    public String getBody() {
        return body;
    }

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

    public Date getFireTime() {
        return fireTime;
    }

    public void setFireTime(Date fireTime) {
        this.fireTime = fireTime;
    }

    public Integer getBodyLength() {
        return bodyLength;
    }

    public void setBodyLength(Integer bodyLength) {
        this.bodyLength = bodyLength;
    }

    public String getFireTimeSource() {
        return fireTimeSource;
    }

    public void setFireTimeSource(String fireTimeSource) {
        this.fireTimeSource = fireTimeSource;
    }

    public Integer getTotalServers() {
        return totalServers;
    }

    public void setTotalServers(Integer totalServers) {
        this.totalServers = totalServers;
    }
}
