src/Entity/RelatedContact.php line 15

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * RelatedContact
  7.  *
  8.  * @ORM\Table(name="related_contact", indexes={@ORM\Index(name="parent_contact", columns={"parent_contact"}), @ORM\Index(name="related_contact", columns={"related_contact"})})
  9.  * @ORM\Entity
  10.  */
  11. class RelatedContact
  12. {
  13.     /**
  14.      * @var int
  15.      *
  16.      * @ORM\Column(name="id", type="integer", nullable=false)
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="IDENTITY")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @var string|null
  23.      *
  24.      * @ORM\Column(name="relation_type", type="string", length=80, nullable=true, options={"default"="NULL"})
  25.      */
  26.     private $relationType null;
  27.     /**
  28.      * @var string|null
  29.      *
  30.      * @ORM\Column(name="comment", type="text", length=65535, nullable=true, options={"default"="NULL"})
  31.      */
  32.     private $comment null;
  33.     /**
  34.      * @var \Contact
  35.      *
  36.      * @ORM\ManyToOne(targetEntity="Contact", inversedBy="parentContacts")
  37.      * @ORM\JoinColumns({
  38.      *   @ORM\JoinColumn(name="related_contact", referencedColumnName="id")
  39.      * })
  40.      */
  41.     private $relatedContact;
  42.     /**
  43.      * @var \Contact
  44.      *
  45.      * @ORM\ManyToOne(targetEntity="Contact", inversedBy="relatedContacts")
  46.      * @ORM\JoinColumn(name="parent_contact", referencedColumnName="id")
  47.      */
  48.     private $parentContact;
  49.     public function getId(): ?int
  50.     {
  51.         return $this->id;
  52.     }
  53.     public function getRelationType(): ?string
  54.     {
  55.         return $this->relationType;
  56.     }
  57.     public function setRelationType(?string $relationType): self
  58.     {
  59.         $this->relationType $relationType;
  60.         return $this;
  61.     }
  62.     public function getComment(): ?string
  63.     {
  64.         return $this->comment;
  65.     }
  66.     public function setComment(?string $comment): self
  67.     {
  68.         $this->comment $comment;
  69.         return $this;
  70.     }
  71.     public function getRelatedContact(): ?Contact
  72.     {
  73.         return $this->relatedContact;
  74.     }
  75.     public function setRelatedContact(?Contact $relatedContact): self
  76.     {
  77.         $this->relatedContact $relatedContact;
  78.         return $this;
  79.     }
  80.     public function getParentContact(): ?Contact
  81.     {
  82.         return $this->parentContact;
  83.     }
  84.     public function setParentContact(?Contact $parentContact): self
  85.     {
  86.         $this->parentContact $parentContact;
  87.         return $this;
  88.     }
  89. }