package com.fshark.overseas.advert.modle;

import com.fshark.overseas.advert.modle.metrics.ActivationMetrics;
import com.fshark.overseas.advert.modle.metrics.EventMetrics;
import com.fshark.overseas.advert.modle.metrics.ServerActivationMetrics;
import com.fshark.overseas.advert.util.Constants;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


@Data
@AllArgsConstructor
@NoArgsConstructor
public class SinkMetricEvent {
    private String eventType;
    private ActivationMetrics eventData;
    private OrderData orderData;
    private EventMetrics eventMetrics;
    private ServerActivationMetrics serverActivationMetrics;


    public boolean isOrderEvent() {
        return Constants.TYPE_SINK_ORDER.equals(eventType) || Constants.TYPE_SINK_OUID_ORDER.equals(eventType);
    }

    public boolean isEvent() {
        return Constants.TYPE_SINK_EVENT.equals(eventType);
    }


    public boolean isOuidEvent() {
        return Constants.TYPE_SINK_OUID_METRIC.equals(eventType);
    }

    public boolean isOuidOrderEvent() {
        return Constants.TYPE_SINK_OUID_ORDER.equals(eventType);
    }


}
