value => '进行中', self::COMPLETED->value => '已完成', self::FAILED->value => '已失败', ]; } /** * 获取参与状态名称 * * @param int $status * @return string */ public static function getName(int $status): string { return self::getAll()[$status] ?? '未知状态'; } /** * 检查参与状态是否有效 * * @param int $status * @return bool */ public static function isValid(int $status): bool { return isset(self::getAll()[$status]); } }