mirror of
https://gitlab.com/omair-personal/izyim.git
synced 2026-08-19 20:34:09 +00:00
46 lines
855 B
PHP
46 lines
855 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Orders\DataTransferObjects;
|
|
|
|
|
|
use Carbon\Carbon;
|
|
|
|
class StepObject
|
|
{
|
|
|
|
/** @var string */
|
|
protected $referenceId;
|
|
|
|
|
|
/** @var null|string */
|
|
protected $complete_date;
|
|
|
|
/**
|
|
* StepObject constructor.
|
|
* @param string $referenceId
|
|
* @param null|string $complete_date
|
|
*/
|
|
public function __construct(string $referenceId, ?string $complete_date = null)
|
|
{
|
|
$this->referenceId = $referenceId;
|
|
$this->complete_date = $complete_date;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getReferenceId(): string
|
|
{
|
|
return $this->referenceId;
|
|
}
|
|
|
|
/**
|
|
* @return Carbon
|
|
*/
|
|
public function getCompleteDate(): Carbon
|
|
{
|
|
return $this->complete_date ? Carbon::parse($this->complete_date) : Carbon::now();
|
|
}
|
|
|
|
|
|
} |