<?php namespace Lc\ShopBundle\Model; use App\Entity\Hub; use Doctrine\ORM\Mapping as ORM; use Lc\ShopBundle\Context\FilterMerchantInterface; use Lc\ShopBundle\Model\AbstractDocumentEntity; use Gedmo\Mapping\Annotation as Gedmo; /** * @ORM\MappedSuperclass() */ abstract class News extends AbstractDocumentEntity implements FilterMerchantInterface { /** * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface", inversedBy="news") * @ORM\JoinColumn(nullable=false) */ protected $merchant; /** * @ORM\Column(type="datetime") * @Gedmo\Timestampable(on="create") */ protected $date; /** * @ORM\Column(type="boolean", nullable=true) */ protected $isSent; public function getDate(): ?\DateTimeInterface { return $this->date; } public function setDate(\DateTimeInterface $date): self { $this->date = $date; return $this; } public function getMerchant(): ?Hub { return $this->merchant; } public function setMerchant(?Hub $merchant): self { $this->merchant = $merchant; return $this; } public function getIsSent(): ?bool { return $this->isSent; } public function setIsSent(?bool $isSent): self { $this->isSent = $isSent; return $this; } }