|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?php
-
- namespace Lc\SovBundle\Model\Site;
-
- use Doctrine\ORM\Mapping as ORM;
- use Gedmo\Mapping\Annotation as Gedmo;
- use Lc\SovBundle\Doctrine\Extension\OpenGraphInterface;
- use Lc\SovBundle\Doctrine\Extension\OpenGraphTrait;
- use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity;
- use Lc\SovBundle\Model\File\FileInterface;
- use Lc\SovBundle\Model\Newsletter\NewsletterInterface;
-
- /**
- * @ORM\MappedSuperclass()
- */
- abstract class NewsModel extends AbstractFullEntity implements NewsInterface
- {
- /**
- * @ORM\Column(type="datetime")
- * @Gedmo\Timestampable(on="create")
- */
- protected $date;
-
- /**
- * @ORM\Column(type="boolean", nullable=true)
- */
- protected $isSent;
-
- /**
- * @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\Newsletter\NewsletterInterface")
- */
- protected $newsletter;
-
- /**
- * @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\File\FileInterface", cascade={"persist", "remove"})
- */
- protected $image;
-
- public function __toString()
- {
- return $this->getTitle();
- }
-
- public function getDate(): ?\DateTimeInterface
- {
- return $this->date;
- }
-
- public function setDate(\DateTimeInterface $date): self
- {
- $this->date = $date;
-
- return $this;
- }
-
- public function getIsSent(): ?bool
- {
- return $this->isSent;
- }
-
- public function setIsSent(?bool $isSent): self
- {
- $this->isSent = $isSent;
-
- return $this;
- }
-
- public function getImage(): ?FileInterface
- {
- return $this->image;
- }
-
- public function setImage(?FileInterface $image): self
- {
- $this->image = $image;
-
- return $this;
- }
-
- public function getNewsletter(): ?NewsletterInterface
- {
- return $this->newsletter;
- }
-
- public function setNewsletter(?NewsletterInterface $newsletter): self
- {
- $this->newsletter = $newsletter;
-
- return $this;
- }
- }
|