src/Entity/Favorite.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\FavoriteRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=FavoriteRepository::class)
  7.  */
  8. class Favorite
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\ManyToOne(targetEntity=Customer::class, inversedBy="favorites")
  13.      * @ORM\JoinColumn(nullable=false)
  14.      */
  15.     private $customer;
  16.     /**
  17.      * @ORM\Id
  18.      * @ORM\Column(type="integer")
  19.      */
  20.     private $object_id;
  21.     public function getCustomer(): ?Customer
  22.     {
  23.         return $this->customer;
  24.     }
  25.     public function setCustomer(?Customer $customer): self
  26.     {
  27.         $this->customer $customer;
  28.         return $this;
  29.     }
  30.     public function getObjectId(): ?int
  31.     {
  32.         return $this->object_id;
  33.     }
  34.     public function setObjectId(int $object_id): self
  35.     {
  36.         $this->object_id $object_id;
  37.         return $this;
  38.     }
  39. }