package cloud.nstart.terravault.ordinis.events.definition;

import cloud.nstart.terravault.ordinis.events.DataScope;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.JsonNode;

import java.time.OffsetDateTime;
import java.util.List;
import java.util.UUID;

@JsonInclude(JsonInclude.Include.NON_NULL)
public record DictionaryDefinitionCreated(
    UUID definitionId,
    String dictionaryName,
    String displayName,
    String description,
    DataScope scope,
    JsonNode schemaJson,
    String schemaVersion,
    String bundle,
    List<String> supportedLocales,
    String defaultLocale,
    OffsetDateTime createdAt,
    String createdBy) implements DictionaryDefinitionEvent {

  @com.fasterxml.jackson.annotation.JsonProperty("type")
  public String type() { return "DefinitionCreated"; }
}
