mirror of
https://github.com/jez500/pricebuddy.git
synced 2026-11-24 19:58:13 +01:00
Add a Product Insights tab backed by a suite of price-analysis calculators and a redesigned price history chart. - Insights calculators: listing-history and daily best-price series builders, price stats, percentile, deal score, distribution, drop events, store showdown, seasonality, availability timeline, and target tracker - ProductInsights aggregator service composing the calculators - Price history chart: best-price and target datasets, best-price line honours the unit/retail filter, horizontal scroll on mobile - Rename the History tab to Insights with consistent heading styling - Feature and unit test coverage, plus review-feedback fixes
20 lines
482 B
PHP
20 lines
482 B
PHP
<?php
|
|
|
|
namespace App\Dto\Insights;
|
|
|
|
use App\Enums\StockStatus;
|
|
use Illuminate\Support\Collection;
|
|
|
|
final class ListingHistory
|
|
{
|
|
/**
|
|
* @param Collection<string, float> $history keyed Y-m-d => price, chronological
|
|
*/
|
|
public function __construct(
|
|
public readonly string $storeName,
|
|
public readonly Collection $history,
|
|
public readonly StockStatus $availability = StockStatus::InStock,
|
|
public readonly ?int $urlId = null,
|
|
) {}
|
|
}
|