29 lines
690 B
PHP
29 lines
690 B
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
enum ExpenseCategory: string
|
|
{
|
|
case Alcohol = 'alcohol';
|
|
case Narcotic = 'narcotic';
|
|
case Solutions = 'solutions';
|
|
case Medicines = 'medicines';
|
|
case Dressing = 'dressing';
|
|
|
|
public function label(): string
|
|
{
|
|
return match ($this) {
|
|
self::Alcohol => 'Спирт',
|
|
self::Narcotic => 'Наркотики',
|
|
self::Solutions => 'Растворы',
|
|
self::Medicines => 'Медикаменты',
|
|
self::Dressing => 'Перевязка / ИМН',
|
|
};
|
|
}
|
|
|
|
public function countsTowardsWithoutDressing(): bool
|
|
{
|
|
return $this !== self::Dressing;
|
|
}
|
|
}
|