feat: add username management system
This commit is contained in:
25
app/enum/UsernameType.php
Normal file
25
app/enum/UsernameType.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\enum;
|
||||
|
||||
enum UsernameType: 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',
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user