generated from panliang/owl-admin-starter
34 lines
642 B
PHP
34 lines
642 B
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
enum CheckStatus: int
|
|
{
|
|
case None = 0;
|
|
case Success = 1;
|
|
case Fail = 2;
|
|
|
|
public static function map()
|
|
{
|
|
return [
|
|
self::None->value => '待审核',
|
|
self::Success->value => '通过',
|
|
self::Fail->value => '不通过',
|
|
];
|
|
}
|
|
|
|
public static function options()
|
|
{
|
|
$list = [];
|
|
foreach (static::map() as $key => $value) {
|
|
array_push($list, ['label' => $value, 'value' => $key]);
|
|
}
|
|
return $list;
|
|
}
|
|
|
|
public function text()
|
|
{
|
|
return data_get(self::map(), $this->value);
|
|
}
|
|
}
|