CaiWuXiTong/app/Utilities/FinanceLedgerAccountStatus.php
shanshi 20dc695549 feat: 完善财务台账账户维护与分页体验 (#412)
合并账户维护、筛选、列设置、无刷新分页、录入模板及批量映射工具。
2026-10-21 11:00:56 +08:00

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)];
}
}