add common refund type and refund status
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user