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.         public function getId(): ?string
  30.         {
  31.             return $this->id;
  32.         }
  33.         public function getCompany(): ?Company
  34.         {
  35.             return $this->company;
  36.         }
  37.         public function setCompany(?Company $company): static
  38.         {
  39.             $this->company $company;
  40.             return $this;
  41.         }
  42.         public function getSupplier(): ?Supplier
  43.         {
  44.             return $this->supplier;
  45.         }
  46.         public function setSupplier(?Supplier $supplier): static
  47.         {
  48.             $this->supplier $supplier;
  49.             return $this;
  50.         }
  51.     
  52. }