src/Entity/CRM/BhpJournals.php line 13

  1. <?php
  2. namespace App\Entity\CRM;
  3. use App\Entity\CRM\Order;
  4. use App\Repository\BhpJournalsRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. #[ORM\Entity(repositoryClassBhpJournalsRepository::class)]
  10. class BhpJournals
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[ORM\Column(length255)]
  17.     private ?string $courseNumber null;
  18.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  19.     private ?\DateTimeInterface $startDate null;
  20.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  21.     private ?\DateTimeInterface $endDate null;
  22.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  23.     private ?\DateTimeInterface $addedDate null;
  24.     #[ORM\ManyToOne(inversedBy'bhpJournals')]
  25.     #[ORM\JoinColumn(nullablefalse)]
  26.     private ?BhpCourse $bhpCourse null;
  27.     #[ORM\ManyToOne(inversedBy'bhpJournals')]
  28.     #[ORM\JoinColumn(nullablefalse)]
  29.     private ?Order $OrderInstance null;
  30.     #[ORM\ManyToOne(inversedBy'bhpJournals')]
  31.     #[ORM\JoinColumn(nullablefalse)]
  32.     private ?BhpOrderProduct $BhpOrderProduct null;
  33.     #[ORM\OneToMany(mappedBy'bhpJournal'targetEntityBhpParticipants::class)]
  34.     private Collection $bhpParticipants;
  35.     public function __construct()
  36.     {
  37.         $this->bhpParticipants = new ArrayCollection();
  38.     }
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getCourseNumber(): ?string
  44.     {
  45.         return $this->courseNumber;
  46.     }
  47.     public function setCourseNumber(string $courseNumber): static
  48.     {
  49.         $this->courseNumber $courseNumber;
  50.         return $this;
  51.     }
  52.     public function getStartDate(): ?\DateTimeInterface
  53.     {
  54.         return $this->startDate;
  55.     }
  56.     public function setStartDate(\DateTimeInterface $startDate): static
  57.     {
  58.         $this->startDate $startDate;
  59.         return $this;
  60.     }
  61.     public function getEndDate(): ?\DateTimeInterface
  62.     {
  63.         return $this->endDate;
  64.     }
  65.     public function setEndDate(\DateTimeInterface $endDate): static
  66.     {
  67.         $this->endDate $endDate;
  68.         return $this;
  69.     }
  70.     public function getAddedDate(): ?\DateTimeInterface
  71.     {
  72.         return $this->addedDate;
  73.     }
  74.     public function setAddedDate(\DateTimeInterface $addedDate): static
  75.     {
  76.         $this->addedDate $addedDate;
  77.         return $this;
  78.     }
  79.     public function getBhpCourse(): ?BhpCourse
  80.     {
  81.         return $this->bhpCourse;
  82.     }
  83.     public function setBhpCourse(?BhpCourse $bhpCourse): static
  84.     {
  85.         $this->bhpCourse $bhpCourse;
  86.         return $this;
  87.     }
  88.     public function getOrderInstance(): ?Order
  89.     {
  90.         return $this->OrderInstance;
  91.     }
  92.     public function setOrderInstance(?Order $OrderInstance): static
  93.     {
  94.         $this->OrderInstance $OrderInstance;
  95.         return $this;
  96.     }
  97.     public function getBhpOrderProduct(): ?BhpOrderProduct
  98.     {
  99.         return $this->BhpOrderProduct;
  100.     }
  101.     public function setBhpOrderProduct(?BhpOrderProduct $BhpOrderProduct): static
  102.     {
  103.         $this->BhpOrderProduct $BhpOrderProduct;
  104.         return $this;
  105.     }
  106.     /**
  107.      * @return Collection<int, BhpParticipants>
  108.      */
  109.     public function getBhpParticipants(): Collection
  110.     {
  111.         return $this->bhpParticipants;
  112.     }
  113.     public function addBhpParticipant(BhpParticipants $bhpParticipant): static
  114.     {
  115.         if (!$this->bhpParticipants->contains($bhpParticipant)) {
  116.             $this->bhpParticipants->add($bhpParticipant);
  117.             $bhpParticipant->setBhpJournal($this);
  118.         }
  119.         return $this;
  120.     }
  121.     public function removeBhpParticipant(BhpParticipants $bhpParticipant): static
  122.     {
  123.         if ($this->bhpParticipants->removeElement($bhpParticipant)) {
  124.             // set the owning side to null (unless already changed)
  125.             if ($bhpParticipant->getBhpJournal() === $this) {
  126.                 $bhpParticipant->setBhpJournal(null);
  127.             }
  128.         }
  129.         return $this;
  130.     }
  131. }