1
0
forked from metin2/web

Added blocking, started e-mail validation, fixed locale strings

This commit is contained in:
2023-07-29 11:43:34 +03:00
parent c26d8e4642
commit 7de2a637c4
13 changed files with 237 additions and 139 deletions

View 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,
};
}
}