<?php

namespace App\Enums;

enum StagesOpportunity :string
{
    CASE LEAD = "LEAD";
    CASE PROSPECT = "PROSPECTO";
    CASE PRESALE = "PRE-VENTA";
    CASE SALE = "VENTA";
    CASE DELIVERY = "ENTREGA";
    CASE LOSS = "PERDIDA";
    CASE COMPLETED = "COMPLETADA";

    public function value(): int
    {
        return match ($this) {
            self::LEAD => 1,
            self::PROSPECT => 2,
            self::PRESALE => 3,
            self::SALE => 4,
            self::DELIVERY => 5,
            self::LOSS => 6,
            self::COMPLETED=> 7,
        };
    }
}
