add common refund type and refund status

This commit is contained in:
2026-02-10 13:30:00 +08:00
parent 8230f5e859
commit 7e400380a1
2 changed files with 60 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
<?php
declare(strict_types=1);
namespace App\Constants;
use Hyperf\Constants\Annotation\Constants;
use Hyperf\Constants\Annotation\Message;
use Hyperf\Constants\EnumConstantsTrait;
#[Constants]
enum RefundStatus: int
{
use EnumConstantsTrait;
#[Message("Refund applied")]
case APPLIED = 1;
#[Message("Seller accepted")]
case SELLER_ACCEPTED = 2;
#[Message("Seller dispute")]
case SELLER_DISPUTE = 3;
#[Message("Seller refused")]
case REFUSED = 4;
#[Message("Refund success")]
case SUCCESS = 5;
#[Message("Refund closed")]
case CLOSED = 6;
}
+27
View File
@@ -0,0 +1,27 @@
<?php
declare(strict_types=1);
namespace App\Constants;
use Hyperf\Constants\Annotation\Constants;
use Hyperf\Constants\Annotation\Message;
use Hyperf\Constants\EnumConstantsTrait;
#[Constants]
enum RefundType: int
{
use EnumConstantsTrait;
#[Message("Refund only")]
case REFUND_ONLY = 1;
#[Message("Return and refund")]
case RETURN_AND_REFUND = 2;
#[Message("Compensation refund")]
case COMPENSATION = 3;
#[Message("Refund without return")]
case REFUND_WITHOUT_RETURN = 4;
}