<?php

namespace App\Classes\Objects\Orders\ReceiveNotes;


use Carbon\Carbon;
use Illuminate\Http\Request;

class ReceiveNoteObject
{
    /** @var int */
    protected $orderId;

    /** @var string */
    protected $trackingNo;

    /** @var Carbon */
    protected $receiveDate;

    /**
     * AbstractReceiveNote constructor.
     * @param int $orderId
     * @param Request $request
     */
    public function __construct(int $orderId, Request $request)
    {
        $this->orderId = $orderId;
        $this->trackingNo = $request->input('tracking_no');
        $this->receiveDate = Carbon::parse($request->input('receive_date'));
    }

    /**
     * @return int
     */
    public function getOrderId(): int
    {
        return $this->orderId;
    }

    /**
     * @return string
     */
    public function getTrackingNo(): string
    {
        return $this->trackingNo;
    }

    /**
     * @return Carbon
     */
    public function getReceiveDate(): Carbon
    {
        return $this->receiveDate;
    }

}