mirror of
https://gitee.com/ctexthuang/hyperf-micro-svc.git
synced 2026-02-08 10:20:16 +08:00
33 lines
552 B
PHP
33 lines
552 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Constants\Model\AdminUser;
|
|
|
|
use Hyperf\Constants\Annotation\Constants;
|
|
use Hyperf\Constants\Annotation\Message;
|
|
use Hyperf\Constants\EnumConstantsTrait;
|
|
|
|
#[Constants]
|
|
enum AdminRoleStatusCode: int
|
|
{
|
|
use EnumConstantsTrait;
|
|
|
|
|
|
#[Message('正常')]
|
|
case Normal = 1;
|
|
|
|
#[Message('停用')]
|
|
case DISABLE = 2;
|
|
|
|
public function isNormal(): bool
|
|
{
|
|
return $this === self::Normal;
|
|
}
|
|
|
|
public function isDisable(): bool
|
|
{
|
|
return $this === self::DISABLE;
|
|
}
|
|
}
|