src/Entity/ContactCompanyType.php line 16

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use App\Repository\ContactCompanyTypeRepository;
  6. /**
  7.  * ContactCompanyType
  8.  *
  9.  * @ORM\Table(name="contact_company_type", indexes={@ORM\Index(name="contact_id", columns={"contact_id"}), @ORM\Index(name="company_type_id", columns={"company_type_id"})})
  10.  * @ORM\Entity(repositoryClass=ContactCompanyTypeRepository::class)
  11.  */
  12. class ContactCompanyType
  13. {
  14.     /**
  15.      * @var int
  16.      *
  17.      * @ORM\Column(name="id", type="integer", nullable=false)
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="IDENTITY")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @var Contact
  24.      *
  25.      * @ORM\ManyToOne(targetEntity="Contact", inversedBy="companyTypes")
  26.      * @ORM\JoinColumns({
  27.      *   @ORM\JoinColumn(name="contact_id", referencedColumnName="id")
  28.      * })
  29.      */
  30.     private $contact;
  31.     /**
  32.      * @var CompanyType
  33.      *
  34.      * @ORM\ManyToOne(targetEntity="CompanyType")
  35.      * @ORM\JoinColumns({
  36.      *   @ORM\JoinColumn(name="company_type_id", referencedColumnName="id")
  37.      * })
  38.      */
  39.     private $companyType;
  40.     public function getId(): ?int
  41.     {
  42.         return $this->id;
  43.     }
  44.     public function getContact(): ?Contact
  45.     {
  46.         return $this->contact;
  47.     }
  48.     public function setContact(?Contact $contact): self
  49.     {
  50.         $this->contact $contact;
  51.         return $this;
  52.     }
  53.     public function getCompanyType(): ?CompanyType
  54.     {
  55.         return $this->companyType;
  56.     }
  57.     public function setCompanyType(?CompanyType $companyType): self
  58.     {
  59.         $this->companyType $companyType;
  60.         return $this;
  61.     }
  62. }