2024-03-30 15:47:48 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models\Enums;
|
|
|
|
|
2024-06-02 22:09:52 +03:00
|
|
|
enum MallItemPricingEnum: string
|
2024-03-30 15:47:48 +02:00
|
|
|
{
|
|
|
|
case CASH = 'CASH';
|
|
|
|
case MILEAGE = 'MILEAGE';
|
|
|
|
|
2025-01-01 11:29:15 +02:00
|
|
|
public function name(): string
|
2024-03-30 15:47:48 +02:00
|
|
|
{
|
|
|
|
return match($this) {
|
2024-06-02 22:09:52 +03:00
|
|
|
self::CASH => __('mall/main.currency.cash'),
|
|
|
|
self::MILEAGE => __('mall/main.currency.mileage')
|
2024-03-30 15:47:48 +02:00
|
|
|
};
|
|
|
|
}
|
2025-01-01 11:29:15 +02:00
|
|
|
|
|
|
|
public function longName(): string
|
|
|
|
{
|
|
|
|
return match($this) {
|
|
|
|
self::CASH => __('mall/main.currency.cash_long'),
|
|
|
|
self::MILEAGE => __('mall/main.currency.mileage_long')
|
|
|
|
};
|
|
|
|
}
|
2024-03-30 15:47:48 +02:00
|
|
|
}
|