Files
shipping-portal/app/Classes/Modules/Steps/DataTransferObjects/StepsObject.php
T
omair saleh d8c767c670 Large commit
2021-08-16 08:59:43 +08:00

88 lines
1.8 KiB
PHP

<?php
namespace App\Classes\Modules\Steps\DataTransferObjects;
use App\Classes\General\Interfaces\DataTransferObject;
use Carbon\Carbon;
class StepsObject implements DataTransferObject
{
private $id;
private $appointee_id;
private $reference;
private $primary;
private $sequence;
private $status;
private $contract_status;
private $completed_date;
private $hash_id;
public function __construct(int $appointee_id, string $reference, bool $primary, float $sequence, int $status, int $contract_status, ?string $completed_date, int $id=0, ?string $hash_id)
{
$this->appointee_id = $appointee_id;
$this->reference = $reference;
$this->primary = $primary;
$this->sequence = $sequence;
$this->status = $status;
$this->contract_status = $contract_status;
$this->completed_date = $completed_date;
$this->id = $id;
$this->hash_id = $hash_id;
}
public function getAppointeeId(): int
{
return $this->appointee_id;
}
public function getReference(): string
{
return $this->reference;
}
public function getPrimary(): bool
{
return $this->primary;
}
public function getSequence(): float
{
return $this->sequence;
}
public function getStatus(): int
{
return $this->status;
}
public function getContractStatus(): int
{
return $this->contract_status;
}
public function getCompletedDate(): Carbon
{
return $this->completed_date ? Carbon::parse($this->completed_date) : Carbon::now();
}
public function getId(): int
{
return $this->id;
}
public function getHashId(): ?string
{
return $this->hash_id;
}
}