src/Entity/Slave/JoinTableUserSupplier.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Slave;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Table(name="eposm_s_join_table_user_supplier")
  9.  * @ORM\Entity
  10.  */
  11. class JoinTableUserSupplier
  12. {
  13.     /**
  14.      * @ORM\Column(name="id", type="bigint")
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue(strategy="AUTO")
  17.      */
  18.     protected $id;
  19.         
  20.     /**
  21.      * @ORM\Column(name="value", type="string")
  22.      */
  23.     protected $value;
  24.     // ManyToOne
  25.         /**
  26.          * @ORM\ManyToOne(targetEntity="App\Entity\Slave\User", inversedBy="suppliers")
  27.          * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
  28.          */
  29.         private $user;
  30.         /**
  31.          * @ORM\ManyToOne(targetEntity="App\Entity\Slave\Supplier", inversedBy="users")
  32.          * @ORM\JoinColumn(name="supplier_id", referencedColumnName="id")
  33.          */
  34.         private $supplier;
  35.         public function getId(): ?string
  36.         {
  37.             return $this->id;
  38.         }
  39.         public function getValue(): ?string
  40.         {
  41.             return $this->value;
  42.         }
  43.         public function setValue(string $value): static
  44.         {
  45.             $this->value $value;
  46.             return $this;
  47.         }
  48.         public function getUser(): ?User
  49.         {
  50.             return $this->user;
  51.         }
  52.         public function setUser(?User $user): static
  53.         {
  54.             $this->user $user;
  55.             return $this;
  56.         }
  57.         public function getSupplier(): ?Supplier
  58.         {
  59.             return $this->supplier;
  60.         }
  61.         public function setSupplier(?Supplier $supplier): static
  62.         {
  63.             $this->supplier $supplier;
  64.             return $this;
  65.         }
  66. }