mirror of
https://gitee.com/ctexthuang/hyperf_rbac_framework_server_ctexthuang.git
synced 2025-12-25 22:47:50 +08:00
first commit
This commit is contained in:
32
app/Constants/Model/AdminUser/AdminMenuStatusCode.php
Normal file
32
app/Constants/Model/AdminUser/AdminMenuStatusCode.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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 AdminMenuStatusCode: 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;
|
||||
}
|
||||
}
|
||||
32
app/Constants/Model/AdminUser/AdminRoleStatusCode.php
Normal file
32
app/Constants/Model/AdminUser/AdminRoleStatusCode.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
31
app/Constants/Model/AdminUser/AdminUserStatusCode.php
Normal file
31
app/Constants/Model/AdminUser/AdminUserStatusCode.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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 AdminUserStatusCode: 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;
|
||||
}
|
||||
}
|
||||
21
app/Constants/Model/AdminUser/AdminUserTypeCode.php
Normal file
21
app/Constants/Model/AdminUser/AdminUserTypeCode.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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 AdminUserTypeCode: int
|
||||
{
|
||||
use EnumConstantsTrait;
|
||||
|
||||
#[Message('系统用户')]
|
||||
case SYSTEM = 100;
|
||||
|
||||
#[Message('普通用户')]
|
||||
case USER = 200;
|
||||
}
|
||||
Reference in New Issue
Block a user