store-manage/app/Enums/CheckStatus.php

47 lines
790 B
PHP

<?php
namespace App\Enums;
/**
* 审核状态
*/
enum CheckStatus: int
{
/**
* 待提审
*/
case None = 1;
/**
* 审核中
*/
case Processing = 2;
/**
* 审核通过
*/
case Success = 3;
/**
* 审核不通过
*/
case Fail = 4;
/**
* 已取消
*/
case Cancel = 5;
public static function options(): array
{
return [
self::None->value => '待提审',
self::Processing->value => '审核中',
self::Success->value => '审核通过',
self::Fail->value => '审核不通过',
self::Cancel->value => '已取消',
];
}
public function text()
{
return data_get(self::options(), $this->value);
}
}