initial commit

This commit is contained in:
TheOnlyMace
2026-05-17 13:26:14 +02:00
commit 75299b723d
176 changed files with 20327 additions and 0 deletions

17
app/Enums/IpPoolType.php Normal file
View File

@@ -0,0 +1,17 @@
<?php
namespace App\Enums;
enum IpPoolType: string
{
case Private = 'private';
case Public = 'public';
public function label(): string
{
return match ($this) {
self::Private => 'Privat (intern)',
self::Public => 'Öffentlich',
};
}
}

17
app/Enums/UserRole.php Normal file
View File

@@ -0,0 +1,17 @@
<?php
namespace App\Enums;
enum UserRole: string
{
case Admin = 'admin';
case Customer = 'customer';
public function label(): string
{
return match ($this) {
self::Admin => 'Administrator',
self::Customer => 'Kunde',
};
}
}

View File

@@ -0,0 +1,33 @@
<?php
namespace App\Enums;
enum VmPowerAction: string
{
case Start = 'start';
case Shutdown = 'shutdown';
case Stop = 'stop';
case Reboot = 'reboot';
case Reset = 'reset';
public function label(): string
{
return match ($this) {
self::Start => 'Starten',
self::Shutdown => 'Herunterfahren (ACPI)',
self::Stop => 'Stoppen (Force)',
self::Reboot => 'Neustart',
self::Reset => 'Reset (Hard)',
};
}
public function requiresRunning(): bool
{
return in_array($this, [self::Shutdown, self::Stop, self::Reboot, self::Reset], true);
}
public function requiresStopped(): bool
{
return $this === self::Start;
}
}