This commit is contained in:
2023-03-08 09:16:04 +08:00
commit e78454540f
1318 changed files with 210569 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace Modules\Mall\Http\Resources\Api\Order;
use Illuminate\Http\Resources\Json\JsonResource;
use Modules\Mall\Http\Resources\Api\Goods\SkuResource;
class OrderItemResource extends JsonResource
{
public function toArray($request): array
{
return [
'item_id' => $this->id,
'qty' => $this->qty,
'price' => $this->price,
'total' => $this->total,
'can' => [
'refund' => $this->canRefund(),
],
'sku' => $this->source,
'refund_status_text' => $this->refund_status_text,
];
}
}