<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\HttpFoundation\File\File;
/**
* @ORM\Entity(repositoryClass="App\Repository\ContenupartenaireRepository")
*/
class Contenupartenaire
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $nom;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $presentation;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $description;
/**
* @ORM\Column(type="string")
*/
private $logo;
/**
* @ORM\Column(type="boolean")
*/
private $status;
/**
* @ORM\Column(type="datetime")
*/
private $create_at;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $update_at;
/**
* @ORM\OneToMany(targetEntity=Produit::class, mappedBy="partenaire")
*/
private $produit;
function __construct()
{
$this->status=true;
//$this->roles = ['ROLE_USER'];
$this->create_at=new \DateTime('UTC');
//$this->loginattemps = new ArrayCollection();
//$this->trackings = new ArrayCollection();
$this->produit = new ArrayCollection(); }
public function getId(): ?int
{
return $this->id;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getPresentation(): ?string
{
return $this->presentation;
}
public function setPresentation(?string $presentation): self
{
$this->presentation = $presentation;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getLogo()
{
return $this->logo;
}
public function setLogo($logo)
{
$this->logo = $logo;
return $this;
}
public function getStatus(): ?bool
{
return $this->status;
}
public function setStatus(bool $status): self
{
$this->status = $status;
return $this;
}
public function getCreateAt(): ?\DateTimeInterface
{
return $this->create_at;
}
public function setCreateAt(\DateTimeInterface $create_at): self
{
$this->create_at = $create_at;
return $this;
}
public function getUpdateAt(): ?\DateTimeInterface
{
return $this->update_at;
}
public function setUpdateAt(?\DateTimeInterface $update_at): self
{
$this->update_at = $update_at;
return $this;
}
/**
* @return Collection|Produit[]
*/
public function getProduit(): Collection
{
return $this->produit;
}
public function addProduit(Produit $produit): self
{
if (!$this->produit->contains($produit)) {
$this->produit[] = $produit;
$produit->setPartenaire($this);
}
return $this;
}
public function removeProduit(Produit $produit): self
{
if ($this->produit->contains($produit)) {
$this->produit->removeElement($produit);
// set the owning side to null (unless already changed)
if ($produit->getPartenaire() === $this) {
$produit->setPartenaire(null);
}
}
return $this;
}
}