From 7886b1e75369fd9f39fd661aa61896ebdc86ac3d Mon Sep 17 00:00:00 2001 From: Nick Zeng Date: Tue, 9 Dec 2025 16:02:52 +0800 Subject: [PATCH] update shopee enum --- .../Platform/Shopee/Constants/ItemStatus.php | 14 ++++++------ .../Platform/Shopee/Constants/OrderStatus.php | 22 +++++++++---------- .../Shopee/Constants/ReturnStatus.php | 16 +++++++------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/backend/app/Platform/Shopee/Constants/ItemStatus.php b/backend/app/Platform/Shopee/Constants/ItemStatus.php index e9ca223..aa91964 100644 --- a/backend/app/Platform/Shopee/Constants/ItemStatus.php +++ b/backend/app/Platform/Shopee/Constants/ItemStatus.php @@ -9,25 +9,25 @@ use Hyperf\Constants\Annotation\Message; use Hyperf\Constants\EnumConstantsTrait; #[Constants] -enum ItemStatus: string +enum ItemStatus: int { use EnumConstantsTrait; #[Message("Normal")] - case NORMAL = 'NORMAL'; + case NORMAL = 1; #[Message("Banned")] - case BANNED = 'BANNED'; + case BANNED = 2; #[Message("Unlisted")] - case UNLIST = 'UNLIST'; + case UNLIST = 3; #[Message("Reviewing")] - case REVIEWING = 'REVIEWING'; + case REVIEWING = 4; #[Message("Seller deleted")] - case SELLER_DELETE = 'SELLER_DELETE'; + case SELLER_DELETE = 5; #[Message("Shopee deleted")] - case SHOPEE_DELETE = 'SHOPEE_DELETE'; + case SHOPEE_DELETE = 6; } diff --git a/backend/app/Platform/Shopee/Constants/OrderStatus.php b/backend/app/Platform/Shopee/Constants/OrderStatus.php index 5c8fd28..014c98b 100644 --- a/backend/app/Platform/Shopee/Constants/OrderStatus.php +++ b/backend/app/Platform/Shopee/Constants/OrderStatus.php @@ -9,37 +9,37 @@ use Hyperf\Constants\Annotation\Message; use Hyperf\Constants\EnumConstantsTrait; #[Constants] -enum OrderStatus: string +enum OrderStatus: int { use EnumConstantsTrait; #[Message("Order is created, buyer has not paid yet.")] - case UNPAID = 'UNPAID'; + case UNPAID = 1; #[Message("Seller can arrange shipment.")] - case READY_TO_SHIP = 'READY_TO_SHIP'; + case READY_TO_SHIP = 2; #[Message("Seller has arranged shipment online and got tracking number from 3PL.")] - case PROCESSED = 'PROCESSED'; + case PROCESSED = 3; #[Message("3PL pickup parcel fail. Need to re arrange shipment.")] - case RETRY_SHIP = 'RETRY_SHIP'; + case RETRY_SHIP = 4; #[Message("The parcel has been drop to 3PL or picked up by 3PL.")] - case SHIPPED = 'SHIPPED'; + case SHIPPED = 5; #[Message("The order has been received by buyer.")] - case TO_CONFIRM_RECEIVE = 'TO_CONFIRM_RECEIVE'; + case TO_CONFIRM_RECEIVE = 6; #[Message("The order's cancelation is under processing.")] - case IN_CANCEL = 'IN_CANCEL'; + case IN_CANCEL = 7; #[Message("The order has been canceled.")] - case CANCELLED = 'CANCELLED'; + case CANCELLED = 8; #[Message("The buyer requested to return the order and order's return is processing.")] - case TO_RETURN = 'TO_RETURN'; + case TO_RETURN = 9; #[Message("The order has been completed.")] - case COMPLETED = 'COMPLETED'; + case COMPLETED = 10; } diff --git a/backend/app/Platform/Shopee/Constants/ReturnStatus.php b/backend/app/Platform/Shopee/Constants/ReturnStatus.php index 642d10e..05b204f 100644 --- a/backend/app/Platform/Shopee/Constants/ReturnStatus.php +++ b/backend/app/Platform/Shopee/Constants/ReturnStatus.php @@ -9,28 +9,28 @@ use Hyperf\Constants\Annotation\Message; use Hyperf\Constants\EnumConstantsTrait; #[Constants] -enum ReturnStatus: string +enum ReturnStatus: int { use EnumConstantsTrait; #[Message("Return requested")] - case REQUESTED = 'REQUESTED'; + case REQUESTED = 1; #[Message("Return accepted")] - case ACCEPTED = 'ACCEPTED'; + case ACCEPTED = 2; #[Message("Return cancelled")] - case CANCELLED = 'CANCELLED'; + case CANCELLED = 3; #[Message("Return judging")] - case JUDGING = 'JUDGING'; + case JUDGING = 4; #[Message("Return closed")] - case CLOSED = 'CLOSED'; + case CLOSED = 5; #[Message("Return processing")] - case PROCESSING = 'PROCESSING'; + case PROCESSING = 6; #[Message("Seller dispute")] - case SELLER_DISPUTE = 'SELLER_DISPUTE'; + case SELLER_DISPUTE = 7; }