Files
exchange-2.0/app/Classes/Modules/Notifications/DataTransferObjects/NotificationObject.php
T
2022-04-16 23:53:12 +08:00

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