forked from metin2/web
Added blocking, started e-mail validation, fixed locale strings
This commit is contained in:
22
app/Models/Enums/AccountStatusEnum.php
Normal file
22
app/Models/Enums/AccountStatusEnum.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Enums;
|
||||
|
||||
enum AccountStatusEnum: string
|
||||
{
|
||||
case OK = 'OK';
|
||||
case REPAIR = 'REPAIR';
|
||||
case BLOCK = 'BLOCK';
|
||||
case NOT_AVAILABLE = 'NOTAVAIL';
|
||||
case BILLING_EXPIRED = 'NOBILL';
|
||||
case BLOCK_LOGIN = 'BLKLOGIN';
|
||||
case WEB_BLOCK = 'WEBBLK';
|
||||
|
||||
public function isBlocked(): bool
|
||||
{
|
||||
return match($this) {
|
||||
self::BLOCK, self::BILLING_EXPIRED, self::BLOCK_LOGIN, self::WEB_BLOCK => true,
|
||||
default => false,
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user