|
- <?php
-
- namespace Lc\CaracoleBundle\Model\Site;
-
- use Doctrine\ORM\Mapping as ORM;
- use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface;
- use Gedmo\Mapping\Annotation as Gedmo;
- use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
- use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity;
-
- /**
- * @ORM\MappedSuperclass()
- */
- abstract class NewsModel extends AbstractFullEntity implements FilterMerchantInterface
- {
- /**
- * @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\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(): ?MerchantInterface
- {
- return $this->merchant;
- }
-
- public function setMerchant(?MerchantInterface $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;
- }
- }
|