package de.accso.flexinale.backoffice.api_contract.event;

import com.fasterxml.jackson.annotation.JsonGetter;
import de.accso.flexinale.backoffice.api_contract.event.model.VorfuehrungTO;
import de.accso.flexinale.common.shared_kernel.Versionable;

@SuppressWarnings({"unused", "CanBeFinal"})
public non-sealed class VorfuehrungUpdatedEvent extends VorfuehrungCRUDEvent {
    private static Version version = Versionable.initialVersion().inc();

    private VorfuehrungUpdatedEvent() { super(null); } // needed for (de)serialization via Jackson

    public VorfuehrungUpdatedEvent(final VorfuehrungTO vorfuehrung) {
        super(vorfuehrung);
    }

    @Override
    @JsonGetter("version") // needed as otherwise the static field version is not (de)serialized
    public Version version() {
        return version;
    }
}
