<?php

namespace Modules\Inventory\Enums;

enum PurchaseStatusEnum: string
{
    case DRAFT = 'draft';
    case SUBMITTED = 'submitted';
    case APPROVED = 'approved';
    case POSTED = 'posted';
    case REJECTED = 'rejected';
    case CANCELLED = 'cancelled';

    public static function casesAsArray(): array
    {
        return array_map(fn(self $case) => $case->value, self::cases());
    }
}

