Files
nl-admin-api/app/Enum/WechatVersionActionEnum.php
李琦 6e2769c528
Some checks failed
Tests / PHP 8.2 (push) Has been cancelled
Tests / PHP 8.3 (push) Has been cancelled
Tests / PHP 8.4 (push) Has been cancelled
优化部分代码,增加微信公众号模板
2026-08-13 19:02:05 +08:00

32 lines
745 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace App\Enum;
/**
* 公众号图文版本流水的操作类型枚举
* 每次创建/修改/删除/回退/发布都会写一条版本快照action 标记这次快照的来源
*/
enum WechatVersionActionEnum: int
{
// 1创建 2修改 3删除 4回退 5发布
case CREATE = 1;
case UPDATE = 2;
case DELETE = 3;
case ROLLBACK = 4;
case PUBLISH = 5;
/**
* 中文展示名(版本列表直接用)
*/
public function description(): string
{
return match ($this) {
self::CREATE => '创建',
self::UPDATE => '修改',
self::DELETE => '删除',
self::ROLLBACK => '回退',
self::PUBLISH => '发布',
};
}
}