src/Entity/ProduitExternalLink.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProduitExternalLinkRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=ProduitExternalLinkRepository::class)
  7.  * @ORM\Table(name="produit_external_link")
  8.  */
  9. class ProduitExternalLink
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity=Produit::class, inversedBy="externalVideoLinks")
  19.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  20.      */
  21.     private $produit;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity=LinkSource::class)
  24.      * @ORM\JoinColumn(nullable=false, onDelete="RESTRICT")
  25.      */
  26.     private $linkSource;
  27.     /**
  28.      * @ORM\Column(type="string", length=255)
  29.      */
  30.     private $url;
  31.     /**
  32.      * @ORM\Column(type="integer", options={"default": 0})
  33.      */
  34.     private $position 0;
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getProduit(): ?Produit
  40.     {
  41.         return $this->produit;
  42.     }
  43.     public function setProduit(?Produit $produit): self
  44.     {
  45.         $this->produit $produit;
  46.         return $this;
  47.     }
  48.     public function getLinkSource(): ?LinkSource
  49.     {
  50.         return $this->linkSource;
  51.     }
  52.     public function setLinkSource(?LinkSource $linkSource): self
  53.     {
  54.         $this->linkSource $linkSource;
  55.         return $this;
  56.     }
  57.     public function getUrl(): ?string
  58.     {
  59.         return $this->url;
  60.     }
  61.     public function setUrl(string $url): self
  62.     {
  63.         $this->url $url;
  64.         return $this;
  65.     }
  66.     public function getPosition(): ?int
  67.     {
  68.         return $this->position;
  69.     }
  70.     public function setPosition(int $position): self
  71.     {
  72.         $this->position $position;
  73.         return $this;
  74.     }
  75. }