enum case consistency, wip creating service

This commit is contained in:
2025-03-31 13:51:02 +00:00
parent 75f2ecb7bf
commit d150f57c8f
16 changed files with 150 additions and 113 deletions

View File

@@ -0,0 +1,31 @@
<?php
namespace App\Actions\Services;
use App\Enums\ServiceCategory;
use App\Enums\ServiceStatus;
use App\Enums\ServiceType;
use App\Jobs\Services\InstallService;
use App\Models\Server;
use Illuminate\Support\Str;
class CreateService
{
public function execute(
Server $server,
string $name,
ServiceCategory $category,
ServiceType $type,
string $version,
string $driverName,
) {
$service = $server->services()->create([
'name' => $name,
'category' => $category,
'type' => $type,
'version' => $version, // 17
'driver_name' => $driverName, // postgres
'status' => ServiceStatus::NOT_INSTALLED,
]);
}
}