src/Entity/Master/JoinTableCompanySupplier.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Master;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Table(name="eposm_m_join_table_company_supplier")
  7.  * @ORM\Entity
  8.  */
  9. class JoinTableCompanySupplier
  10. {
  11.     /**
  12.      * @ORM\Column(name="id", type="bigint")
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue(strategy="AUTO")
  15.      */
  16.     protected $id;
  17.         
  18.     // ManyToOne
  19.         /**
  20.          * @ORM\ManyToOne(targetEntity="App\Entity\Master\Company", inversedBy="suppliers")
  21.          * @ORM\JoinColumn(name="company_id", referencedColumnName="id")
  22.          */
  23.         private $company;
  24.         /**
  25.          * @ORM\ManyToOne(targetEntity="App\Entity\Master\Supplier", inversedBy="companies")
  26.          * @ORM\JoinColumn(name="supplier_id", referencedColumnName="id")
  27.          */
  28.         private $supplier;
  29.     //
  30.     public function getId(): ?string
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getCompany(): ?Company
  35.     {
  36.         return $this->company;
  37.     }
  38.     public function setCompany(?Company $company): self
  39.     {
  40.         $this->company $company;
  41.         return $this;
  42.     }
  43.     public function getSupplier(): ?Supplier
  44.     {
  45.         return $this->supplier;
  46.     }
  47.     public function setSupplier(?Supplier $supplier): self
  48.     {
  49.         $this->supplier $supplier;
  50.         return $this;
  51.     }
  52.     
  53. }