feat: add createdAt to Connector and Watchlist

This commit is contained in:
Maël Gangloff
2024-08-03 01:40:18 +02:00
parent af6bf4eebd
commit e26360a523
7 changed files with 88 additions and 4 deletions

View File

@@ -60,6 +60,10 @@ class Connector
#[ORM\OneToMany(targetEntity: WatchList::class, mappedBy: 'connector')]
private Collection $watchLists;
#[Groups(['connector:list', 'watchlist:list'])]
#[ORM\Column]
private ?\DateTimeImmutable $createdAt = null;
public function __construct()
{
$this->id = Uuid::v4();
@@ -136,4 +140,16 @@ class Connector
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeImmutable $createdAt): static
{
$this->createdAt = $createdAt;
return $this;
}
}