package at.procon.eventhub.importing;

import java.time.OffsetDateTime;

public record ImportTimeChunkDto(
        int sequence,
        OffsetDateTime occurredFrom,
        OffsetDateTime occurredTo
) {
    public String stableKey() {
        String from = occurredFrom == null ? "MIN" : occurredFrom.toString();
        String to = occurredTo == null ? "MAX" : occurredTo.toString();
        return sequence + ":" + from + ":" + to;
    }
}
