<?php

namespace App\Classes\Modules\Orders\DataTransferObjects;


use Carbon\Carbon;

class ScheduleObject
{

    /** @var string */
    private $ETA;

    /** @var string */
    private $ETD;

    /** @var int */
    private $type;

    /** @var null|string */
    private $issue;

    /**
     * ScheduleObject constructor.
     * @param string $ETA
     * @param string $ETD
     * @param int $type
     * @param null|string $issue
     */
    public function __construct(string $ETA, string $ETD, int $type, ?string $issue = null)
    {
        $this->ETA = $ETA;
        $this->ETD = $ETD;
        $this->type = $type;
        $this->issue = $issue;
    }

    /**
     * @return Carbon
     */
    public function getETA(): Carbon
    {
        return Carbon::parse( $this->ETA);
    }

    /**
     * @return Carbon
     */
    public function getETD(): Carbon
    {
        return Carbon::parse($this->ETD);
    }

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

    /**
     * @return null|string
     */
    public function getIssue(): ?string
    {
        return $this->issue;
    }




}