31 lines
831 B
PHP
31 lines
831 B
PHP
<?php
|
|
|
|
namespace App\Utilities;
|
|
|
|
final class FinanceLedgerAccountStatus
|
|
{
|
|
public const NORMAL = 'normal';
|
|
public const ONLINE_BANKING_ABNORMAL = 'online_banking_abnormal';
|
|
public const LIMITED = 'limited';
|
|
public const BUSINESS_DEREGISTERED = 'business_deregistered';
|
|
|
|
public const OPTIONS = [
|
|
self::NORMAL => '正常',
|
|
self::ONLINE_BANKING_ABNORMAL => '网银异常',
|
|
self::LIMITED => '限额',
|
|
self::BUSINESS_DEREGISTERED => '工商注销',
|
|
];
|
|
|
|
public static function normalize(?string $status): string
|
|
{
|
|
$status = trim((string) $status);
|
|
|
|
return array_key_exists($status, self::OPTIONS) ? $status : self::NORMAL;
|
|
}
|
|
|
|
public static function label(?string $status): string
|
|
{
|
|
return self::OPTIONS[self::normalize($status)];
|
|
}
|
|
}
|