Change snip and tag entities to public columns
This commit is contained in:
@@ -10,47 +10,23 @@ trait TrackedTrait
|
||||
{
|
||||
#[ORM\Column]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?DateTime $createdAt = null;
|
||||
public ?DateTime $createdAt = null;
|
||||
|
||||
#[ORM\ManyToOne]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?User $createdBy = null;
|
||||
|
||||
public function getCreatedBy(): ?User
|
||||
{
|
||||
return $this->createdBy;
|
||||
}
|
||||
|
||||
public function setCreatedBy(?User $createdBy): self
|
||||
{
|
||||
$this->createdBy = $createdBy;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCreatedAt(): ?DateTime
|
||||
{
|
||||
return $this->createdAt;
|
||||
}
|
||||
|
||||
public function setCreatedAt(DateTime $createdAt): self
|
||||
{
|
||||
$this->createdAt = $createdAt;
|
||||
|
||||
return $this;
|
||||
}
|
||||
public ?User $createdBy = null;
|
||||
|
||||
public function setCreatedAtNowNoSeconds(): self
|
||||
{
|
||||
$this->setCreatedAt(DateTime::createFromFormat('Y-m-d H:i', date('Y-m-d H:i')));
|
||||
$this->createdAt = DateTime::createFromFormat('Y-m-d H:i', date('Y-m-d H:i'));
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setCreatedAtNow(): self
|
||||
{
|
||||
$this->setCreatedAt(new DateTime());
|
||||
$this->createdAt = new DateTime();
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user