<?php

namespace services\dtos;

class CartDto
{
    /** @var CartProductDto[] $products */
    public readonly array $products;

    public readonly float $subtotal;
    public readonly float $discountTotal;
    public readonly float $shippingTotal;
    public readonly float $feeTotal;
    public readonly float $grandTotal;


    public function __construct(
        array $products,
        float $subtotal,
        float $discountTotal,
        float $shippingTotal,
        float $feeTotal,
        float $grandTotal
    ) {
        $this->products = $products;
        $this->subtotal = $subtotal;
        $this->discountTotal = $discountTotal;
        $this->shippingTotal = $shippingTotal;
        $this->feeTotal = $feeTotal;
        $this->grandTotal = $grandTotal;
    }
}