Notion : https://www.notion.so/hamss/2579c8d34ba080d586b6faaae249f476?source=copy_link
40 lines
1.0 KiB
PHP
40 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Services\TenantBootstrap;
|
|
|
|
use App\Services\TenantBootstrap\Contracts\TenantBootstrapStep;
|
|
use App\Services\TenantBootstrap\Steps\CapabilityProfilesStep;
|
|
use App\Services\TenantBootstrap\Steps\CategoriesStep;
|
|
use App\Services\TenantBootstrap\Steps\MenusStep;
|
|
use App\Services\TenantBootstrap\Steps\SettingsStep;
|
|
|
|
class RecipeRegistry
|
|
{
|
|
/**
|
|
* 레시피마다 실행 순서 정의
|
|
*/
|
|
public function steps(string $recipe = 'STANDARD'): array
|
|
{
|
|
return match ($recipe) {
|
|
'LITE' => [
|
|
new CapabilityProfilesStep(),
|
|
new CategoriesStep(),
|
|
],
|
|
default => [ // STANDARD
|
|
new CapabilityProfilesStep(),
|
|
new CategoriesStep(),
|
|
new MenusStep(),
|
|
new SettingsStep(),
|
|
],
|
|
};
|
|
}
|
|
|
|
public function version(string $recipe = 'STANDARD'): int
|
|
{
|
|
return match ($recipe) {
|
|
'LITE' => 1,
|
|
default => 1,
|
|
};
|
|
}
|
|
}
|