nang cap san sang import
This commit is contained in:
28
app/Enums/ServiceType.php
Normal file
28
app/Enums/ServiceType.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum ServiceType: string
|
||||
{
|
||||
case MANAGEMENT_FEE = 'management_fee';
|
||||
case GRATITUDE = 'gratitude';
|
||||
case SELF_BUSINESS = 'self_business';
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::MANAGEMENT_FEE => 'Phí quản lý',
|
||||
self::GRATITUDE => 'Tri ân',
|
||||
self::SELF_BUSINESS => 'Tự doanh',
|
||||
};
|
||||
}
|
||||
|
||||
public function options(): array
|
||||
{
|
||||
return [
|
||||
self::MANAGEMENT_FEE->value => self::MANAGEMENT_FEE->label(),
|
||||
self::GRATITUDE->value => self::GRATITUDE->label(),
|
||||
self::SELF_BUSINESS->value => self::SELF_BUSINESS->label(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user