src/Entity/CRM/CommercialOfferSendings.php line 12

  1. <?php
  2. namespace App\Entity\CRM;
  3. use App\Repository\CommercialOfferSendingsRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassCommercialOfferSendingsRepository::class)]
  9. class CommercialOfferSendings
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\ManyToOne(inversedBy'commercialOfferSendings')]
  16.     private ?Admin $addedByAdmin null;
  17.     #[ORM\ManyToOne(inversedBy'commercialOfferSendings')]
  18.     private ?Consultant $addedByConsultant null;
  19.     #[ORM\OneToMany(mappedBy'commercialOfferSendings'targetEntityCommercialOfferIndividual::class)]
  20.     private Collection $individualOffers;
  21. //    #[ORM\Column]
  22. //    private ?bool $isAccepted = null;
  23.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  24.     private ?\DateTimeInterface $addedDate null;
  25.     #[ORM\Column]
  26.     private ?bool $sent null;
  27.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  28.     private ?\DateTimeInterface $sentDate null;
  29. //    #[ORM\ManyToOne(inversedBy: 'commercialOfferSendingsAccepts')]
  30. //    #[ORM\JoinColumn(nullable: true)]
  31. //    private ?Admin $acceptedBy = null;
  32. //
  33. //    #[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
  34. //    private ?\DateTimeInterface $acceptedDate = null;
  35.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  36.     private ?string $customMailContent null;
  37.     public function __construct()
  38.     {
  39.         $this->individualOffers = new ArrayCollection();
  40.     }
  41.     public function getId(): ?int
  42.     {
  43.         return $this->id;
  44.     }
  45.     public function getAddedByAdmin(): ?Admin
  46.     {
  47.         return $this->addedByAdmin;
  48.     }
  49.     public function setAddedByAdmin(?Admin $addedByAdmin): static
  50.     {
  51.         $this->addedByAdmin $addedByAdmin;
  52.         return $this;
  53.     }
  54.     public function getAddedByConsultant(): ?Consultant
  55.     {
  56.         return $this->addedByConsultant;
  57.     }
  58.     public function setAddedByConsultant(?Consultant $addedByConsultant): static
  59.     {
  60.         $this->addedByConsultant $addedByConsultant;
  61.         return $this;
  62.     }
  63.     /**
  64.      * @return Collection<int, CommercialOfferIndividual>
  65.      */
  66.     public function getIndividualOffers(): Collection
  67.     {
  68.         return $this->individualOffers;
  69.     }
  70.     public function addIndividualOffer(CommercialOfferIndividual $individualOffer): static
  71.     {
  72.         if (!$this->individualOffers->contains($individualOffer)) {
  73.             $this->individualOffers->add($individualOffer);
  74.             $individualOffer->setCommercialOfferSendings($this);
  75.         }
  76.         return $this;
  77.     }
  78.     public function removeIndividualOffer(CommercialOfferIndividual $individualOffer): static
  79.     {
  80.         if ($this->individualOffers->removeElement($individualOffer)) {
  81.             // set the owning side to null (unless already changed)
  82.             if ($individualOffer->getCommercialOfferSendings() === $this) {
  83.                 $individualOffer->setCommercialOfferSendings(null);
  84.             }
  85.         }
  86.         return $this;
  87.     }
  88. //    public function isAccepted(): ?bool
  89. //    {
  90. //        return $this->isAccepted;
  91. //    }
  92. //
  93. //    public function setIsAccepted(bool $isAccepted): static
  94. //    {
  95. //        $this->isAccepted = $isAccepted;
  96. //
  97. //        return $this;
  98. //    }
  99.     public function getAddedDate(): ?\DateTimeInterface
  100.     {
  101.         return $this->addedDate;
  102.     }
  103.     public function setAddedDate(\DateTimeInterface $addedDate): static
  104.     {
  105.         $this->addedDate $addedDate;
  106.         return $this;
  107.     }
  108.     public function isSent(): ?bool
  109.     {
  110.         return $this->sent;
  111.     }
  112.     public function setSent(?bool $sent): static
  113.     {
  114.         $this->sent $sent;
  115.         return $this;
  116.     }
  117.     public function getSentDate(): ?\DateTimeInterface
  118.     {
  119.         return $this->sentDate;
  120.     }
  121.     public function setSentDate(?\DateTimeInterface $sentDate): static
  122.     {
  123.         $this->sentDate $sentDate;
  124.         return $this;
  125.     }
  126. //    public function getAcceptedBy(): ?Admin
  127. //    {
  128. //        return $this->acceptedBy;
  129. //    }
  130. //
  131. //    public function setAcceptedBy(?Admin $acceptedBy): static
  132. //    {
  133. //        $this->acceptedBy = $acceptedBy;
  134. //
  135. //        return $this;
  136. //    }
  137. //
  138. //    public function getAcceptedDate(): ?\DateTimeInterface
  139. //    {
  140. //        return $this->acceptedDate;
  141. //    }
  142. //
  143. //    public function setAcceptedDate(?\DateTimeInterface $acceptedDate): static
  144. //    {
  145. //        $this->acceptedDate = $acceptedDate;
  146. //
  147. //        return $this;
  148. //    }
  149.     public function getCustomMailContent(): ?string
  150.     {
  151.         return $this->customMailContent;
  152.     }
  153.     public function setCustomMailContent(?string $customMailContent): static
  154.     {
  155.         $this->customMailContent $customMailContent;
  156.         return $this;
  157.     }
  158. }