feat: add domain management system

This commit is contained in:
idevakk
2025-11-15 11:40:04 -08:00
parent d9291f06eb
commit 466a370f28
12 changed files with 508 additions and 0 deletions

25
app/enum/DomainType.php Normal file
View File

@@ -0,0 +1,25 @@
<?php
namespace App\enum;
enum DomainType: string
{
case PUBLIC = 'public';
case PREMIUM = 'premium';
public function getColor(): string
{
return match ($this) {
self::PUBLIC => 'warning',
self::PREMIUM => 'success',
};
}
public function getLabel(): string
{
return match ($this) {
self::PUBLIC => 'Public',
self::PREMIUM => 'Premium',
};
}
}

31
app/enum/ProviderType.php Normal file
View File

@@ -0,0 +1,31 @@
<?php
namespace App\enum;
enum ProviderType: string
{
case GMAIL = 'gmail.com';
case YAHOO = 'yahoo.com';
case OUTLOOK = 'outlook.com';
case CUSTOM = 'custom';
public function getColor(): string
{
return match ($this) {
self::GMAIL => 'danger',
self::YAHOO => 'primary',
self::OUTLOOK => 'info',
self::CUSTOM => 'success',
};
}
public function getLabel(): string
{
return match ($this) {
self::GMAIL => 'Gmail',
self::YAHOO => 'Yahoo',
self::OUTLOOK => 'Outlook',
self::CUSTOM => 'Custom',
};
}
}