Base de Datos
This commit is contained in:
17
app/src/Model/Venta/Promotion/State.php
Normal file
17
app/src/Model/Venta/Promotion/State.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Venta\Promotion;
|
||||
|
||||
enum State: int
|
||||
{
|
||||
case ACTIVE = 1;
|
||||
case INACTIVE = 0;
|
||||
|
||||
public static function name(int $state): string
|
||||
{
|
||||
return match ($state) {
|
||||
self::ACTIVE => 'active',
|
||||
self::INACTIVE => 'inactive',
|
||||
default => throw new \InvalidArgumentException('Unexpected match value')
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user