<?php

namespace App\DataObjects;

use Carbon\Carbon;

readonly class CreateSaleDTO
{
    /**
     * Create a new class instance.
     */
    public function __construct(
         protected string $reference_number,
         protected Carbon $happened_on,
         protected int $branch_id,
         protected int $user_id,
    )
    {}

    public function toArray(): array
    {
        return [
            'reference_number' => $this->reference_number,
            'happened_on' => $this->happened_on,
            'branch_id' => $this->branch_id,
            'user_id' => $this->user_id,
        ];
    }
}
