public function toArray(Request $request): array 	{ 		return [ 			'id' => $this->getKey(), 			'advance_payment' => $this->advance_payment, 			'note' => $this->note, 			'approved_by_buyer' => $this->approved_by_buyer, 			'email_recipients' => $this->email_recipients, 			'buyer' => new BuyerResource($this->getBuyerDetails()), 			'warehouse' => new WarehouseResource($this->getWarehouseDetails()), 			'author' => new UserPublicResource($this->author->authParent), 			'items' => OrderItemResource::collection($this->orderItems), 			'status' => new StatusResource($this->lastStatus->status), 			'comments' => $this->comments_count ?? $this->comments()->count(), 			'media' => MediaResource::collection($this->storage()->files('miscellaneous')), 			'created_at' => formatTimestamp($this->created_at), 			'updated_at' => formatTimestamp($this->updated_at), 		]; 	}