<?php

namespace Modules\Mall\Http\Resources\Api\Order;

use Illuminate\Http\Resources\Json\JsonResource;

class OrderLogisticResource extends JsonResource
{

    public function toArray($request): array
    {
        return [
            'express_id'     => $this->express_id,
            'express_no'     => $this->express_no,
            'order_state'    => $this->order->state_text,
            'logistic_name'  => $this->express->name,
            'logistic_cover' => $this->express->cover_url,
            'address'        => $this->getFullAddress(),
        ];
    }

}