mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 20:44:19 +00:00
102 lines
1.9 KiB
PHP
102 lines
1.9 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Notifications\DataTransferObjects;
|
|
|
|
use App\Classes\General\Interfaces\Notifiable;
|
|
use App\Classes\General\Interfaces\DataTransferObject;
|
|
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
|
|
|
class NotificationObject implements DataTransferObject
|
|
{
|
|
/** @var string */
|
|
private $title;
|
|
|
|
/** @var string */
|
|
private $description;
|
|
|
|
/** @var Notifiable */
|
|
private $subject;
|
|
|
|
/** @var Notifiable */
|
|
private $target;
|
|
|
|
/** @var Notifiable */
|
|
private $causer;
|
|
|
|
/** @var int|null */
|
|
private $status;
|
|
|
|
/**
|
|
* OrderObject constructor.
|
|
* @param string $reference
|
|
* @param int $type
|
|
* @param int|null $status
|
|
*/
|
|
public function __construct(
|
|
string $title,
|
|
string $description,
|
|
Notifiable $subject,
|
|
Notifiable $target,
|
|
Notifiable $causer,
|
|
?int $status = ApprovalStatus::PENDING_VERIFICATION
|
|
)
|
|
{
|
|
$this->title = $title;
|
|
$this->description = $description;
|
|
$this->subject = $subject;
|
|
$this->target = $target;
|
|
$this->causer = $causer;
|
|
$this->status = $status;
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getTitle(): string
|
|
{
|
|
return $this->title;
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getDescription(): string
|
|
{
|
|
return $this->description;
|
|
}
|
|
|
|
/**
|
|
* @return Notifiable
|
|
*/
|
|
public function getSubject(): Notifiable
|
|
{
|
|
return $this->subject;
|
|
}
|
|
|
|
/**
|
|
* @return Notifiable
|
|
*/
|
|
public function getTarget(): Notifiable
|
|
{
|
|
return $this->target;
|
|
}
|
|
|
|
/**
|
|
* @return Notifiable
|
|
*/
|
|
public function getCauser(): Notifiable
|
|
{
|
|
return $this->causer;
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getStatus(): int
|
|
{
|
|
return $this->status;
|
|
}
|
|
|
|
|
|
}
|