<?php

declare(strict_types=1);

/*
 * This file is part of the Ferienpass package.
 *
 * (c) Richard Henkenjohann <richard@ferienpass.online>
 *
 * For more information visit the project website <https://ferienpass.online>
 * or the documentation under <https://docs.ferienpass.online>.
 */

namespace Ferienpass\CoreBundle\Enum;

/**
 * Why the lottery ({@see \Ferienpass\CoreBundle\ApplicationSystem\Lotting\Assignment})
 * arrived at a non-confirming decision for an attendance. Recorded on the
 * {@see \Ferienpass\CoreBundle\Entity\ParticipantLog} so a draw stays explainable:
 * in particular it tells apart the four hard-exclusion gates (which can leave seats
 * empty while applicants go unfulfilled) from an honest loss in the draw.
 */
final class DecisionReason
{
    // Hard-exclusion gates in Seat::valueForAttendance() — these score 0 and are
    // never admitted, even when capacity remains.
    public const string FIRSTCOME_EXCLUDED = 'firstcome_excluded';
    public const string ALREADY_CONFIRMED_VARIANT = 'already_confirmed_variant';
    public const string POSTAL_CODE_NOT_PREFERRED = 'postal_code_not_preferred';
    public const string NOT_IN_DRAW = 'not_in_draw';

    // Outcomes for an otherwise-eligible (positive-value) seat that did not win.
    public const string OUTCOMPETED = 'outcompeted';
    public const string WAITLIST_EXHAUSTED = 'waitlist_exhausted';

    // Pre-draw withdrawal: a non-all-dates attendance whose participant already won a
    // sibling/variant of this offer (see LotEdition).
    public const string SIBLING_CONFLICT = 'sibling_conflict';
}
