|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- <?php
-
- namespace Lc\SovBundle\Model\Reminder;
-
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\Common\Collections\Collection;
- use Doctrine\ORM\Mapping as ORM;
- use Lc\SovBundle\Doctrine\EntityInterface;
- use Lc\SovBundle\Doctrine\Pattern\AbstractLightEntity;
- use Lc\SovBundle\Model\User\UserInterface;
-
- /**
- * @ORM\MappedSuperclass()
- */
- abstract class ReminderModel extends AbstractLightEntity implements ReminderInterface, EntityInterface
- {
- /**
- * temporary fields (do not delete)
- */
- protected $relatedPage;
-
- /**
- * @ORM\Column(type="string", length=255)
- */
- protected $title;
-
- /**
- * @ORM\Column(type="text", nullable=true)
- */
- protected $description;
-
- /**
- * @ORM\Column(type="string", length=64, nullable=true)
- */
- protected $crudAction;
-
- /**
- * @ORM\Column(type="string", length=255, nullable=true)
- */
- protected $crudControllerFqcn;
-
- /**
- * @ORM\Column(type="integer", nullable=true)
- */
- protected $entityId;
-
- /**
- * @ORM\ManyToMany(targetEntity="Lc\SovBundle\Model\User\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 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 getCrudAction(): ?string
- {
- return $this->crudAction;
- }
-
- public function setCrudAction(?string $crudAction): self
- {
- $this->crudAction = $crudAction;
-
- return $this;
- }
-
- public function getCrudControllerFqcn(): ?string
- {
- return $this->crudControllerFqcn;
- }
-
- public function setCrudControllerFqcn(?string $crudControllerFqcn): self
- {
- $this->crudControllerFqcn = $crudControllerFqcn;
-
- return $this;
- }
-
- public function getEntityId(): ?int
- {
- return $this->entityId;
- }
-
- public function setEntityId(?int $entityId): self
- {
- $this->entityId = $entityId;
-
- return $this;
- }
-
- /**
- * @return Collection|UserInterface[]
- */
- public function getUsers(): Collection
- {
- return $this->users;
- }
-
- public function addUser(UserInterface $user): self
- {
- if (!$this->users->contains($user)) {
- $this->users[] = $user;
- }
-
- return $this;
- }
-
- public function removeUser(UserInterface $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;
- }
- }
|