106 lines
2.0 KiB
PHP
Executable File
106 lines
2.0 KiB
PHP
Executable File
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Entity;
|
|
|
|
class WatchedIssueComment implements \JsonSerializable
|
|
{
|
|
/** @var string */
|
|
private $signum;
|
|
|
|
/** @var string */
|
|
private $name;
|
|
|
|
/** @var string */
|
|
private $content;
|
|
|
|
/** @var \DateTimeImmutable */
|
|
private $date;
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getSignum(): ?string
|
|
{
|
|
return $this->signum;
|
|
}
|
|
|
|
/**
|
|
* @param string $signum
|
|
* @return WatchedIssueComment
|
|
*/
|
|
public function setSignum(string $signum): WatchedIssueComment
|
|
{
|
|
$this->signum = $signum;
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getName(): ?string
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
/**
|
|
* @param string $name
|
|
* @return WatchedIssueComment
|
|
*/
|
|
public function setName(string $name): WatchedIssueComment
|
|
{
|
|
$this->name = $name;
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getContent(): ?string
|
|
{
|
|
return $this->content;
|
|
}
|
|
|
|
/**
|
|
* @param string $content
|
|
* @return WatchedIssueComment
|
|
*/
|
|
public function setContent(string $content): WatchedIssueComment
|
|
{
|
|
$this->content = $content;
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return \DateTimeImmutable
|
|
*/
|
|
public function getDate(): ?\DateTimeImmutable
|
|
{
|
|
return $this->date;
|
|
}
|
|
|
|
/**
|
|
* @param \DateTimeImmutable $date
|
|
* @return WatchedIssueComment
|
|
*/
|
|
public function setDate(\DateTimeImmutable $date): WatchedIssueComment
|
|
{
|
|
$this->date = $date;
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
function jsonSerialize()
|
|
{
|
|
return [
|
|
'signum' => $this->getSignum(),
|
|
'name' => $this->getName(),
|
|
'content' => $this->getContent(),
|
|
'date' => $this->getDate() ? $this->getDate()->format("Y-m-d H:i:s") : null,
|
|
];
|
|
}
|
|
}
|