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 VorfuehrungCreatedEvent extends VorfuehrungCRUDEvent {
    private static Version version = Versionable.initialVersion().inc();

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

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

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