appand new position for 3 position in harim and need dependency
This commit is contained in:
22
app/Enums/HarimTraffic.php
Normal file
22
app/Enums/HarimTraffic.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum HarimTraffic : string
|
||||
{
|
||||
case SABOK = 'سبک';
|
||||
case MOTEVASET = 'متوسط';
|
||||
case SANGIN = 'سنگین';
|
||||
|
||||
|
||||
|
||||
public function amount(): float
|
||||
{
|
||||
return match ($this) {
|
||||
self::SABOK => 1.0,
|
||||
self::MOTEVASET => 1.5,
|
||||
self::SANGIN => 2.0,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user