<?php

namespace Modules\Inventory\Enums;

enum StockMovementTypeEnum: string
{
    case OPENING = 'opening';
    case PURCHASE = 'purchase';
    case PURCHASE_RETURN = 'purchase_return';
    case SALE = 'sale';
    case SALE_RETURN = 'sale_return';
    case TRANSFER_IN = 'transfer_in';
    case TRANSFER_OUT = 'transfer_out';
    case ADJUSTMENT_IN = 'adjustment_in';
    case ADJUSTMENT_OUT = 'adjustment_out';
    case DAMAGE = 'damage';
    case EXPIRED = 'expired';
    case CONSUMPTION = 'consumption';

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