diff --git a/src/Domain/Model/Battery/BatteryProperties.php b/src/Domain/Model/Battery/BatteryProperties.php
new file mode 100644
index 0000000..777aa00
--- /dev/null
+++ b/src/Domain/Model/Battery/BatteryProperties.php
@@ -0,0 +1,22 @@
+usableCapacity->__toString();
+ }
+}
\ No newline at end of file
diff --git a/src/Domain/Model/Battery/CellChemistry.php b/src/Domain/Model/Battery/CellChemistry.php
new file mode 100644
index 0000000..4e9d707
--- /dev/null
+++ b/src/Domain/Model/Battery/CellChemistry.php
@@ -0,0 +1,10 @@
+productionBegin && $this->productionEnd) {
+ if ($this->productionBegin->year > $this->productionEnd->year) {
+ throw new \InvalidArgumentException('Production begin year must be before production end year');
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/src/Domain/Model/Charging/ChargeCurve.php b/src/Domain/Model/Charging/ChargeCurve.php
new file mode 100644
index 0000000..b0e51bf
--- /dev/null
+++ b/src/Domain/Model/Charging/ChargeCurve.php
@@ -0,0 +1,22 @@
+usableCapacity->__toString();
- }
-}
\ No newline at end of file
diff --git a/src/Domain/Model/Value/Date.php b/src/Domain/Model/Value/Date.php
new file mode 100644
index 0000000..4ea80b1
--- /dev/null
+++ b/src/Domain/Model/Value/Date.php
@@ -0,0 +1,25 @@
+month < 1 || $this->month > 12) {
+ throw new \InvalidArgumentException('Month must be between 1 and 12');
+ }
+
+ if ($this->day < 1 || $this->day > 31) {
+ throw new \InvalidArgumentException('Day must be between 1 and 31');
+ }
+ }
+
+ public function __toString(): string
+ {
+ return $this->year . '-' . $this->month . '-' . $this->day;
+ }
+}
\ No newline at end of file
diff --git a/src/Domain/Model/Value/Price.php b/src/Domain/Model/Value/Price.php
index ce0eb95..94031f5 100644
--- a/src/Domain/Model/Value/Price.php
+++ b/src/Domain/Model/Value/Price.php
@@ -7,6 +7,7 @@ class Price
public function __construct(
public readonly int $price,
public readonly Currency $currency,
+ public readonly ?bool $includesVat = null,
) {}
public function __toString(): string
diff --git a/src/Domain/Model/Value/Season.php b/src/Domain/Model/Value/Season.php
new file mode 100644
index 0000000..36d026c
--- /dev/null
+++ b/src/Domain/Model/Value/Season.php
@@ -0,0 +1,11 @@
+image, [
new BrandTile('Skoda'),
- new PriceTile(new Price(43900, Currency::euro())),
- new AvailabilityTile('Bestellbar', 'Oktober 2024'),
- new RangeTile(new Range(450)),
+ new PriceTile($skodaElroq85->catalogPrice),
+ new ProductionPeriodTile($skodaElroq85->productionBegin, $skodaElroq85->productionEnd),
]),
- new SubSectionTile('Performance', [
- new PowerTile(new Power(210)),
- new AccelerationTile(new Acceleration(6.6)),
- new TopSpeedTile(new TopSpeed(180)),
- new DrivetrainTile(new Drivetrain('rear')),
- ], 'Motor and driving performance specifications'),
- new SubSectionTile('Range & Efficiency', [
- new RangeTile(new Range(450)),
- new BatteryTile(new Battery(new Energy(77.0), new Energy(82.0))),
- new ConsumptionTile(new Consumption(new Energy(171))),
- new ChargingTile(new ChargingSpeed(new Power(175), new Power(11))),
- ], 'Battery capacity, range, and charging capabilities'),
+ new SubSectionTile('Performance', [
+ new PowerTile($drivingCharacteristics->power),
+ new AccelerationTile($drivingCharacteristics->acceleration),
+ new TopSpeedTile($drivingCharacteristics->topSpeed),
+ new DrivetrainTile(new Drivetrain('rear')),
+ new ConsumptionTile($drivingCharacteristics->consumption),
+ ], 'Individual performance metrics'),
+
+ new SubSectionTile('Reichweite', [
+ new RangeTile($wltpRange->range),
+ new RangeComparisonTile($skodaElroq85->rangeProperties),
+ new RealRangeTile($realRangeTests),
+ ], 'Range data from different sources'),
+
+ new SubSectionTile('Batterie', [
+ new BatteryTile($skodaElroq85->battery),
+ new BatteryDetailsTile($skodaElroq85->battery),
+ ], 'Battery capacity and technology'),
+
+ new SubSectionTile('Laden', [
+ new ChargeTimeTile($chargingProperties->chargeTimeProperties),
+ new ChargingConnectivityTile($chargingProperties->chargingConnectivity),
+ new ChargeCurveTile($chargingProperties->chargeCurve),
+ ], 'Charging capabilities and compatibility'),
]),
]);
}
diff --git a/src/Domain/Search/Tiles/BatteryDetailsTile.php b/src/Domain/Search/Tiles/BatteryDetailsTile.php
new file mode 100644
index 0000000..bc92169
--- /dev/null
+++ b/src/Domain/Search/Tiles/BatteryDetailsTile.php
@@ -0,0 +1,12 @@
+
+
+ Batterietechnologie
+
\ No newline at end of file
diff --git a/templates/result/tiles/chargecurve.html.twig b/templates/result/tiles/chargecurve.html.twig
new file mode 100644
index 0000000..703b8ba
--- /dev/null
+++ b/templates/result/tiles/chargecurve.html.twig
@@ -0,0 +1,74 @@
+
+
Ladekurve
+
+
+
+ Ladeleistung über Batteriestand (SOC)
+
\ No newline at end of file
diff --git a/templates/result/tiles/chargetime.html.twig b/templates/result/tiles/chargetime.html.twig
new file mode 100644
index 0000000..ca0d2e4
--- /dev/null
+++ b/templates/result/tiles/chargetime.html.twig
@@ -0,0 +1,19 @@
+
+
Schnellladen
+
+ {% if tile.chargeTimeProperties.minutesFrom10To80 %}
+
\ No newline at end of file
diff --git a/templates/result/tiles/chargingconnectivity.html.twig b/templates/result/tiles/chargingconnectivity.html.twig
new file mode 100644
index 0000000..dbada25
--- /dev/null
+++ b/templates/result/tiles/chargingconnectivity.html.twig
@@ -0,0 +1,35 @@
+
+ {% for connector in tile.chargingConnectivity.connectorTypes %}
+
+ {{ connector.value }}
+
+ {% endfor %}
+
+ {% endif %}
+
+ Ladeschnittstellen & Features
+
\ No newline at end of file
diff --git a/templates/result/tiles/performanceoverview.html.twig b/templates/result/tiles/performanceoverview.html.twig
new file mode 100644
index 0000000..a2ca4dc
--- /dev/null
+++ b/templates/result/tiles/performanceoverview.html.twig
@@ -0,0 +1,40 @@
+
\ No newline at end of file
diff --git a/templates/result/tiles/productionperiod.html.twig b/templates/result/tiles/productionperiod.html.twig
new file mode 100644
index 0000000..de6ef7f
--- /dev/null
+++ b/templates/result/tiles/productionperiod.html.twig
@@ -0,0 +1,38 @@
+
+
Produktionszeitraum
+
+ {% if tile.productionBegin or tile.productionEnd %}
+
+ {% if tile.productionBegin %}
+
+
{{ tile.productionBegin.year }}
+ Start
+
+ {% endif %}
+
+ {% if tile.productionBegin and tile.productionEnd %}
+
+ {% elseif tile.productionBegin %}
+
+ {% endif %}
+
+ {% if tile.productionEnd %}
+
+
{{ tile.productionEnd.year }}
+ Ende
+
+ {% elseif tile.productionBegin %}
+
+
laufend
+ aktuell
+
+ {% endif %}
+
+ {% else %}
+
+ Zeitraum unbekannt
+
+ {% endif %}
+
+ Verfügbarkeit
+
\ No newline at end of file
diff --git a/templates/result/tiles/rangecomparison.html.twig b/templates/result/tiles/rangecomparison.html.twig
new file mode 100644
index 0000000..3188520
--- /dev/null
+++ b/templates/result/tiles/rangecomparison.html.twig
@@ -0,0 +1,28 @@
+
+
Reichweiten-Vergleich
+
+
+ {% if tile.rangeProperties.wltp %}
+
+ WLTP
+ {{ tile.rangeProperties.wltp.range.kilometers }} km
+
\ No newline at end of file
diff --git a/templates/result/tiles/realrange.html.twig b/templates/result/tiles/realrange.html.twig
new file mode 100644
index 0000000..b6d9775
--- /dev/null
+++ b/templates/result/tiles/realrange.html.twig
@@ -0,0 +1,18 @@
+
+
Praxis-Tests
+
+ {% for realTest in tile.realRangeTests|slice(0, 3) %}
+
+
+ {% if realTest.season %}{{ realTest.season.value }}{% endif %}
+ {% if realTest.averageSpeed %} • {{ realTest.averageSpeed }}{% endif %}
+
+ {{ realTest.range.kilometers }} km
+