<?php

namespace App\Shared\Event;

/**
 * فهرست بستهٔ نام رویدادها — بند ۱۶ مستند.
 *
 * نام رویداد قرارداد عمومی است: مصرف‌کننده روی رشته شرط می‌گذارد. تایپوی یک حرفی
 * یعنی رویدادی که هیچ‌کس نمی‌شنود و هیچ خطایی هم نمی‌دهد، پس فهرست بسته است.
 */
final class DomainEvents
{
    public const HOLD_CREATED             = 'HoldCreated';
    public const APPOINTMENT_BOOKED       = 'AppointmentBooked';
    public const APPOINTMENT_CANCELLED    = 'AppointmentCancelled';
    public const APPOINTMENT_RESCHEDULED  = 'AppointmentRescheduled';
    public const PATIENT_NO_SHOW          = 'PatientNoShow';
    public const APPOINTMENT_COMPLETED    = 'AppointmentCompleted';
    public const RESOURCE_BLOCKED         = 'ResourceBlocked';
    public const RESOURCE_RELEASED        = 'ResourceReleased';
    public const COURSE_STARTED           = 'CourseStarted';
    public const COURSE_SESSION_COMPLETED = 'CourseSessionCompleted';
    public const COURSE_COMPLETED         = 'CourseCompleted';
    public const PACKAGE_PURCHASED        = 'PackagePurchased';
    public const CREDIT_CONSUMED          = 'CreditConsumed';
    public const CREDIT_REFUNDED          = 'CreditRefunded';

    public const ALL = [
        self::HOLD_CREATED,
        self::APPOINTMENT_BOOKED,
        self::APPOINTMENT_CANCELLED,
        self::APPOINTMENT_RESCHEDULED,
        self::PATIENT_NO_SHOW,
        self::APPOINTMENT_COMPLETED,
        self::RESOURCE_BLOCKED,
        self::RESOURCE_RELEASED,
        self::COURSE_STARTED,
        self::COURSE_SESSION_COMPLETED,
        self::COURSE_COMPLETED,
        self::PACKAGE_PURCHASED,
        self::CREDIT_CONSUMED,
        self::CREDIT_REFUNDED,
    ];
}
