Files

21 lines
332 B
PHP
Raw Permalink Normal View History

2025-05-12 00:19:35 +08:00
<?php
namespace App\Enum;
/**
* 状态码定义
*/
enum StatusEnum: int
{
// 状态 0正常 1禁用
case NORMAL = 0;
case DISABLE = 1;
public function description(): string
{
return match ($this) {
self::NORMAL => '正常',
self::DISABLE => '禁用',
};
}
}