published_date -> publishedDate

This commit is contained in:
2025-05-18 08:19:33 +01:00
parent 6327c3509e
commit 5fe6dee6c5
2 changed files with 6 additions and 6 deletions

View File

@@ -18,7 +18,7 @@ class Note
private ?string $content = null;
#[ORM\Column(type: Types::DATE_MUTABLE)]
private ?\DateTime $published_date = null;
private ?\DateTime $publishedDate = null;
#[ORM\Column(length: 255)]
private ?string $slug = null;
@@ -42,12 +42,12 @@ class Note
public function getPublishedDate(): ?\DateTime
{
return $this->published_date;
return $this->publishedDate;
}
public function setPublishedDate(\DateTime $published_date): static
public function setPublishedDate(\DateTime $publishedDate): static
{
$this->published_date = $published_date;
$this->publishedDate = $publishedDate;
return $this;
}

View File

@@ -25,8 +25,8 @@ class NoteRepository extends ServiceEntityRepository
$max->add(DateInterval::createFromDateString('1 day'));
$wherePublishedOnDate = $this->createQueryBuilder('n')
->andWhere('n.published_date >= :min')
->andWhere('n.published_date < :max')
->andWhere('n.publishedDate >= :min')
->andWhere('n.publishedDate < :max')
->setParameter('min', $min)
->setParameter('max', $max)
->getQuery()