src\Entity\Produit.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. use Symfony\Component\HttpFoundation\File\File;
  6. #[ORM\Entity(repositoryClass\App\Repository\ProduitRepository::class)]
  7. class Produit
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column(type'integer')]
  12.     private $id;
  13.     #[ORM\ManyToOne(targetEntity\App\Entity\Service::class, inversedBy'produit')]
  14.     private $service;
  15.     #[ORM\Column(type'string'length255)]
  16.     private $libelle;
  17.     #[ORM\Column(type'text'nullabletrue)]
  18.     private $description;
  19.     #[ORM\Column(type'float'nullabletrue)]
  20.     private $prix;
  21.     #[ORM\Column(type'datetime')]
  22.     private $createat;
  23.     #[ORM\Column(type'datetime'nullabletrue)]
  24.     private $updateat;
  25.  #[ORM\Column(type'string')]
  26.     private $image;
  27.     #[ORM\ManyToOne(targetEntityContenupartenaire::class, inversedBy'produit')]
  28.     private $partenaire;
  29.     function __construct()
  30.     {
  31.         
  32.         $this->createat= new \DateTime('UTC');
  33.         
  34.     }
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getService(): ?Service
  40.     {
  41.         return $this->service;
  42.     }
  43.     public function setService(?Service $service): self
  44.     {
  45.         $this->service $service;
  46.         return $this;
  47.     }
  48.     public function getLibelle(): ?string
  49.     {
  50.         return $this->libelle;
  51.     }
  52.     public function setLibelle(string $libelle): self
  53.     {
  54.         $this->libelle $libelle;
  55.         return $this;
  56.     }
  57.     public function getDescription(): ?string
  58.     {
  59.         return $this->description;
  60.     }
  61.     public function setDescription(?string $description): self
  62.     {
  63.         $this->description $description;
  64.         return $this;
  65.     }
  66.     public function getPrix(): ?float
  67.     {
  68.         return $this->prix;
  69.     }
  70.     public function setPrix(?float $prix): self
  71.     {
  72.         $this->prix $prix;
  73.         return $this;
  74.     }
  75.     public function getCreateat(): ?\DateTimeInterface
  76.     {
  77.         return $this->createat;
  78.     }
  79.     public function setCreateat(\DateTimeInterface $createat): self
  80.     {
  81.         $this->createat $createat;
  82.         return $this;
  83.     }
  84.     public function getUpdateat(): ?\DateTimeInterface
  85.     {
  86.         return $this->updateat;
  87.     }
  88.     public function setUpdateat(?\DateTimeInterface $updateat): self
  89.     {
  90.         $this->updateat $updateat;
  91.         return $this;
  92.     }
  93.     public function getImage()
  94.     {
  95.         return $this->image;
  96.     }
  97.     public function setImage($image)
  98.     {
  99.         $this->image $image;
  100.         return $this;
  101.     }
  102.     public function getPartenaire(): ?Contenupartenaire
  103.     {
  104.         return $this->partenaire;
  105.     }
  106.     public function setPartenaire(?Contenupartenaire $partenaire): self
  107.     {
  108.         $this->partenaire $partenaire;
  109.         return $this;
  110.     }
  111. }