package de.fete.domain.model;

import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.time.ZoneId;

/** Domain entity representing an event. */
public record Event(
    Long id,
    EventToken eventToken,
    OrganizerToken organizerToken,
    String title,
    String description,
    OffsetDateTime dateTime,
    ZoneId timezone,
    String location,
    LocalDate expiryDate,
    OffsetDateTime createdAt,
    boolean cancelled,
    String cancellationReason
) {

  /** Returns a copy of this event with cancellation applied. */
  public Event withCancellation(boolean cancelled, String cancellationReason) {
    return new Event(
        id, eventToken, organizerToken, title, description,
        dateTime, timezone, location, expiryDate, createdAt,
        cancelled, cancellationReason);
  }
}
