22 lines
474 B
PHP
22 lines
474 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Modules\Sales\Application\DTOs;
|
|
|
|
/**
|
|
* A quick sale order as entered: quantities by product id, an optional
|
|
* customer and an optional name to call the customer by.
|
|
*/
|
|
final readonly class OrderData
|
|
{
|
|
/**
|
|
* @param array<int, int> $quantities
|
|
*/
|
|
public function __construct(
|
|
public array $quantities,
|
|
public ?int $customerId = null,
|
|
public ?string $customerName = null,
|
|
) {}
|
|
}
|