feat: add scope/type enums, update Flight model, and organize enums
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums\Flight;
|
||||
|
||||
enum FlightScope:int
|
||||
{
|
||||
case Domestic = 1;
|
||||
case International = 2;
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Domestic => 'داخلی',
|
||||
self::International => 'خارجی',
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums\Flight;
|
||||
|
||||
enum FlightStatus:int
|
||||
{
|
||||
case AVAILABLE = 0;
|
||||
|
||||
case FULL = 1;
|
||||
case CANCELLED = 2;
|
||||
case DRAFT = 3;
|
||||
case DELAYED = 4;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums\Flight;
|
||||
|
||||
enum FlightTripType: int
|
||||
{
|
||||
case ONEWAY = 0;
|
||||
case ROUNDTRIP = 1;
|
||||
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match($this) {
|
||||
self::ONEWAY => 'یک طرفه',
|
||||
self::ROUNDTRIP => 'رفت و برگشت',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums\Flight;
|
||||
|
||||
enum FlightType:int
|
||||
{
|
||||
case Systematic = 1;
|
||||
case Charter = 2;
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Systematic => 'سیستمی',
|
||||
self::Charter => 'چارتر',
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user