public function toArray($request): array 	{ 		$lang = $request->lang;  		$discountPrice = $this->applyDiscount($this->getDiscount());  		return [ 			'id' => $this->id, 			'class_name' => 'Variant', 			'parent_name' => $this->product->determineTranslation($lang, 'name'), 			'parent_code' => $this->product->code, 			'product_id' => $this->product_id, 			'name' => $this->determineTranslation($lang, 'name'), 			'price' => number_format((float) $this->price, 2), 			'price_with_discount' => $discountPrice ? number_format((float) $discountPrice, 2) : null, 			'second_price' => $this->getSecondPrice($this->price), 			'second_price_with_discount' => $this->getSecondPrice($discountPrice), 			'lowest_price' => $this->lowest_price, 			'second_lowest_price' => $this->getSecondPrice((string) $this->lowest_price), 			'weight' => $this->weight, 			'user_liked' => $this->hasUserLiked(), 			'media' => $this->storage()->getFirstThumb('images') ?: $this->product->storage()->getFirstThumb('images'), 			'created_at' => formatTimestamp($this->created_at), 			'updated_at' => formatTimestamp($this->updated_at), 		]; 	}