package de.fete.domain.model;

import java.util.Objects;
import java.util.UUID;

/** Type-safe wrapper for the secret organizer token. */
public record OrganizerToken(UUID value) {

  /** Validates that the token value is not null. */
  public OrganizerToken {
    Objects.requireNonNull(value, "organizerToken must not be null");
  }

  /** Generates a new random organizer token. */
  public static OrganizerToken generate() {
    return new OrganizerToken(UUID.randomUUID());
  }
}
