<?php

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

use Illuminate\Http\Resources\Json\JsonResource;

class OrderExpressResource extends JsonResource
{

    public function toArray($request): array
    {
        return [
            'express_id'   => $this->id,
            'name'         => $this->name,
            'mobile'       => $this->mobile,
            'express_name' => $this->express_id ? $this->express->name : '',
            'express_no'   => $this->express_no,
            'full_address' => $this->getFullAddress(),
        ];
    }

}
