|
- <?php
-
- namespace Lc\ShopBundle\Model;
-
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\Common\Collections\Collection;
- use Doctrine\ORM\Mapping as ORM;
- use Lc\ShopBundle\Context\FilterMerchantInterface;
-
- /**
- * @ORM\MappedSuperclass()
- */
- abstract class Reminder extends AbstractEntity implements FilterMerchantInterface
- {
- public $relatedPage;
-
- /**
- * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface")
- * @ORM\JoinColumn(nullable=false)
- */
- protected $merchant;
-
- /**
- * @ORM\Column(type="string", length=255)
- */
- protected $title;
-
- /**
- * @ORM\Column(type="text", nullable=true)
- */
- protected $description;
-
- /**
- * @ORM\Column(type="string", length=255, nullable=true)
- */
- protected $entityName;
-
- /**
- * @ORM\Column(type="integer", nullable=true)
- */
- protected $entityId;
-
- /**
- * @ORM\Column(type="string", length=255, nullable=true)
- */
- protected $entityAction;
-
- /**
- * @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\UserInterface")
- */
- protected $users;
-
- /**
- * @ORM\Column(type="date", nullable=true)
- */
- protected $dateReminder;
-
-
- /**
- * @ORM\Column(type="boolean", nullable=false)
- */
- protected $done;
-
-
- public function __construct()
- {
- $this->users = new ArrayCollection();
- $this->done = false;
- }
-
- public function getMerchant(): ?Merchant
- {
- return $this->merchant;
- }
-
- public function setMerchant(?Merchant $merchant): self
- {
- $this->merchant = $merchant;
-
- return $this;
- }
-
- public function getTitle(): ?string
- {
- return $this->title;
- }
-
- public function setTitle(string $title): self
- {
- $this->title = $title;
-
- return $this;
- }
-
- public function getDescription(): ?string
- {
- return $this->description;
- }
-
- public function setDescription(?string $description): self
- {
- $this->description = $description;
-
- return $this;
- }
-
- public function getEntityName(): ?string
- {
- return $this->entityName;
- }
-
- public function setEntityName(?string $entityName): self
- {
- $this->entityName = $entityName;
-
- return $this;
- }
-
- public function getEntityAction(): ?string
- {
- return $this->entityAction;
- }
-
- public function setEntityAction(?string $entityAction): self
- {
- $this->entityAction = $entityAction;
-
- return $this;
- }
-
- public function getEntityId(): ?int
- {
- return $this->entityId;
- }
-
- public function setEntityId(?int $entityId): self
- {
- $this->entityId = $entityId;
-
- return $this;
- }
-
- /**
- * @return Collection|User[]
- */
- public function getUsers(): Collection
- {
- return $this->users;
- }
-
- public function addUser(User $user): self
- {
- if (!$this->users->contains($user)) {
- $this->users[] = $user;
- }
-
- return $this;
- }
-
- public function removeUser(User $user): self
- {
- if ($this->users->contains($user)) {
- $this->users->removeElement($user);
- }
-
- return $this;
- }
-
- public function getDateReminder(): ?\DateTimeInterface
- {
- return $this->dateReminder;
- }
-
- public function setDateReminder(?\DateTimeInterface $dateReminder): self
- {
- $this->dateReminder = $dateReminder;
-
- return $this;
- }
-
- public function getDone(): ?bool
- {
- return $this->done;
- }
-
- public function setDone(?bool $done): self
- {
- $this->done = $done;
-
- return $this;
- }
-
- }
|