src/Entity/Product.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Doctrine\ORM\Mapping\OneToMany;
  5. use Doctrine\ORM\Mapping\OneToOne;
  6. /**
  7.  * Product
  8.  *
  9.  * @ORM\Table(name="product")
  10.  * @ORM\Entity
  11.  */
  12. class Product
  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 string
  24.      *
  25.      * @ORM\Column(name="name", type="text", length=65535, nullable=false)
  26.      */
  27.     private $name;
  28.     /**
  29.      * @OneToMany(targetEntity="ProductAvailability", mappedBy="product", fetch="EAGER")
  30.      */
  31.     private $availabilities;
  32.     /**
  33.      * @var ProductConnection | null
  34.      * @OneToOne(targetEntity="ProductConnection", mappedBy="product", fetch="EAGER")
  35.      */
  36.     private $connection;
  37.     /**
  38.      * @return int
  39.      */
  40.     public function getId(): int
  41.     {
  42.         return $this->id;
  43.     }
  44.     /**
  45.      * @param int $id
  46.      */
  47.     public function setId(int $id): void
  48.     {
  49.         $this->id $id;
  50.     }
  51.     /**
  52.      * @return string
  53.      */
  54.     public function getName(): string
  55.     {
  56.         return $this->name;
  57.     }
  58.     /**
  59.      * @param string $name
  60.      */
  61.     public function setName(string $name): void
  62.     {
  63.         $this->name $name;
  64.     }
  65.     /**
  66.      * @return mixed
  67.      */
  68.     public function getAvailabilities()
  69.     {
  70.         return $this->availabilities;
  71.     }
  72.     /**
  73.      * @param mixed $availabilities
  74.      */
  75.     public function setAvailabilities($availabilities): void
  76.     {
  77.         $this->availabilities $availabilities;
  78.     }
  79.     /**
  80.      * @return ProductConnection|null
  81.      */
  82.     public function getConnection(): ?ProductConnection
  83.     {
  84.         return $this->connection;
  85.     }
  86. }