feat: add tour enums, update Tour model, and create TourImage relation
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums\Admin\Tour;
|
||||
|
||||
enum TourMode:int
|
||||
{
|
||||
case AIR = 0;
|
||||
case LAND = 1;
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::AIR => 'زمینی',
|
||||
self::LAND => 'هوایی',
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums\Admin\Tour;
|
||||
|
||||
enum TourScope:int
|
||||
{
|
||||
case DOMESTIC = 0;
|
||||
case INTERNATIONAL = 1;
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::DOMESTIC => 'داخلی',
|
||||
self::INTERNATIONAL => 'خارجی',
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums\Admin\Tour;
|
||||
|
||||
enum TourType:int
|
||||
{
|
||||
case RECREATIONAL = 0;
|
||||
case TOURISM = 1;
|
||||
case PILGRIMAGE = 2;
|
||||
case ECO_TOURISM = 3;
|
||||
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::RECREATIONAL => 'تفریحی',
|
||||
self::TOURISM => 'گردشگری',
|
||||
self::PILGRIMAGE => 'زیارتی',
|
||||
self::ECO_TOURISM => 'طبیعتگردی'
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user