<?php
namespace App\Entity;
use App\Repository\NewsRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: NewsRepository::class)]
class News extends Node
{
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $dateOfPublish = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $dateFrom = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $dateTill = null;
#[ORM\OneToOne(cascade: ['persist', 'remove'])]
private ?Image $image = null;
#[ORM\OneToOne(cascade: ['persist', 'remove'])]
private ?Image $banner = null;
public function getDateOfPublish(): ?\DateTimeInterface
{
return $this->dateOfPublish;
}
public function setDateOfPublish(?\DateTimeInterface $dateOfPublish): static
{
$this->dateOfPublish = $dateOfPublish;
return $this;
}
public function getDateFrom(): ?\DateTimeInterface
{
return $this->dateFrom;
}
public function setDateFrom(\DateTimeInterface $dateFrom): static
{
$this->dateFrom = $dateFrom;
return $this;
}
public function getDateTill(): ?\DateTimeInterface
{
return $this->dateTill;
}
public function setDateTill(?\DateTimeInterface $dateTill): static
{
$this->dateTill = $dateTill;
return $this;
}
public function getImage(): ?Image
{
return $this->image;
}
public function setImage(?Image $image): static
{
$this->image = $image;
return $this;
}
public function getBanner(): ?Image
{
return $this->banner;
}
public function setBanner(?Image $banner): static
{
$this->banner = $banner;
return $this;
}
}