* watcher api endpoint implemented
This commit is contained in:
105
src/App/Entity/WatchedIssueComment.php
Executable file
105
src/App/Entity/WatchedIssueComment.php
Executable file
@@ -0,0 +1,105 @@
|
||||
<?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,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user