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

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

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

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

    public FilmUpdatedEvent(final FilmTO film) {
        super(film);
    }

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