Files
Omair Saleh 919e0252f7 large commit
2019-06-03 10:29:08 +08:00

73 lines
1.1 KiB
PHP

<?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;
}
}