Files
water_new/modules/Mall/Http/Resources/Api/Order/RefundItemsResource.php
2023-03-08 09:16:04 +08:00

23 lines
617 B
PHP

<?php
namespace Modules\Mall\Http\Resources\Api\Order;
use Illuminate\Http\Resources\Json\JsonResource;
class RefundItemsResource extends JsonResource
{
public function toArray($request): array
{
return [
'refund_item_id' => $this->id,
'price' => $this->price,
'goods_id' => $this->source ? $this->source['goods_id'] : '',
'cover' => $this->source ? $this->source['cover'] : '',
'goods_name' => $this->source ? $this->source['goods_name'] : '',
'qty' => $this->qty,
];
}
}