<?php

namespace Kylin\Logistics\Enums;

/**
 * 调度状态枚举
 */
enum DispatchStatus: string
{
    case DISPATCHED = 'dispatched';
    case DEPARTED = 'departed';
    case ARRIVED = 'arrived';
    case COMPLETED = 'completed';
    case CANCELLED = 'cancelled';

    public function label(): string
    {
        return match ($this) {
            self::DISPATCHED => '已调度',
            self::DEPARTED => '已发车',
            self::ARRIVED => '已到达',
            self::COMPLETED => '已完成',
            self::CANCELLED => '已取消',
        };
    }
}
