<?php

declare(strict_types=1);

namespace Kylin\Medical\Enums;

/**
 * 预约挂号状态
 */
enum AppointmentStatus: string
{
    case PENDING = 'pending';           // 待就诊
    case CONSULTING = 'consulting';     // 就诊中
    case COMPLETED = 'completed';       // 已完成
    case CANCELLED = 'cancelled';       // 已取消
    case REFUNDED = 'refunded';         // 已退号

    public function label(): string
    {
        return match ($this) {
            self::PENDING => '待就诊',
            self::CONSULTING => '就诊中',
            self::COMPLETED => '已完成',
            self::CANCELLED => '已取消',
            self::REFUNDED => '已退号',
        };
    }
}
