<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\HttpFoundation\File\File;
/**
* @ORM\Entity(repositoryClass="App\Repository\ProduitRepository")
*/
class Produit
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Service", inversedBy="produit")
*/
private $service;
/**
* @ORM\Column(type="string", length=255)
*/
private $libelle;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $description;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $prix;
/**
* @ORM\Column(type="datetime")
*/
private $createat;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $updateat;
/**
* @ORM\Column(type="string")
*/
private $image;
/**
* @ORM\ManyToOne(targetEntity=Contenupartenaire::class, inversedBy="produit")
*/
private $partenaire;
function __construct()
{
$this->createat= new \DateTime('UTC');
}
public function getId(): ?int
{
return $this->id;
}
public function getService(): ?Service
{
return $this->service;
}
public function setService(?Service $service): self
{
$this->service = $service;
return $this;
}
public function getLibelle(): ?string
{
return $this->libelle;
}
public function setLibelle(string $libelle): self
{
$this->libelle = $libelle;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getPrix(): ?float
{
return $this->prix;
}
public function setPrix(?float $prix): self
{
$this->prix = $prix;
return $this;
}
public function getCreateat(): ?\DateTimeInterface
{
return $this->createat;
}
public function setCreateat(\DateTimeInterface $createat): self
{
$this->createat = $createat;
return $this;
}
public function getUpdateat(): ?\DateTimeInterface
{
return $this->updateat;
}
public function setUpdateat(?\DateTimeInterface $updateat): self
{
$this->updateat = $updateat;
return $this;
}
public function getImage()
{
return $this->image;
}
public function setImage($image)
{
$this->image = $image;
return $this;
}
public function getPartenaire(): ?Contenupartenaire
{
return $this->partenaire;
}
public function setPartenaire(?Contenupartenaire $partenaire): self
{
$this->partenaire = $partenaire;
return $this;
}
}