<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bundle\SecurityBundle\Security\UserAuthenticator;
use Symfony\Component\Security\Core\Security;
/**
* @ORM\Entity(repositoryClass="App\Repository\TraitementDsDemdDachatRepository")
*/
class TraitementDsDemdDachat
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255,nullable=true)
*/
private $numero;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $date_demd;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $contact;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $pays;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $rlce1;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $rlce2;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $rlce3;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $tel ;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $email ;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $website ;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $mail_envoye ;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $appel_arg ;
/**
* @ORM\Column(type="string",length=255, nullable=true)
*/
private $societe;
/**
* @ORM\Column(type="string",length=255, nullable=true)
*/
private $rdv_physique;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="traitementDsDemdDachats")
*/
private $user;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\SousJacent", inversedBy="traitementDsDemdDachats")
*/
private $sous_jacent;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Status", inversedBy="traitementDsDemdDachats")
*/
private $status;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="agent")
*/
private $agent;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Niveau", inversedBy="traitementDsDemdDachats")
*/
private $niveau;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\PlaceDeMarche", inversedBy="traitementDsDemdDachats")
*/
private $place_de_marche;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Products", inversedBy="traitementDsDemdDachats")
*/
private $produit;
// public function __construct(Security $security){
// $this->createdAt = new \DateTime('now');
// if (!isset($this->numero)){
// $this->numero = 'DA'.random_int(1,99).date('s');
// }else{
// $this->numero = 'DA'.random_int(1,99).date('s');
// }
// $this->user = $security->getUser();
// }
public function __construct(){
$this->createdAt = new \DateTime('now');
if (!isset($this->numero)){
$this->numero = 'DA'.random_int(1,99).date('s');
}else{
$this->numero = 'DA'.random_int(1,99).date('s');
}
// $this->user = $security->getUser();
}
/**
* @return mixed
*/
public function getId(): ?int
{
return $this->id;
}
/**
* @return mixed
*/
public function getNumero():?string
{
return $this->numero;
}
/**
* @param mixed $numero
* @return TraitementDsDemdDachat
*/
public function setNumero(?string $numero): self
{
$this->numero = $numero;
return $this;
}
public function getDateDemd():?\DateTimeInterface
{
return $this->date_demd;
}
public function setDateDemd(?\DateTimeInterface $date_demd):self
{
$this->date_demd = $date_demd;
return $this;
}
/**
* @return mixed
*/
public function getContact():?string
{
return $this->contact;
}
/**
* @param mixed $contact
* @return TraitementDsDemdDachat
*/
public function setContact(?string $contact): self
{
$this->contact = $contact;
return $this;
}
/**
* @return mixed
*/
public function getPays():?string
{
return $this->pays;
}
/**
* @param mixed $pays
* @return TraitementDsDemdDachat
*/
public function setPays(?string $pays): self
{
$this->pays = $pays;
return $this;
}
/**
* @return mixed
*/
public function getRlce1():?string
{
return $this->rlce1;
}
/**
* @param mixed $rlce1
* @return TraitementDsDemdDachat
*/
public function setRlce1(?string $rlce1): self
{
$this->rlce1 = $rlce1;
return $this;
}
/**
* @return mixed
*/
public function getRlce2():?string
{
return $this->rlce2;
}
/**
* @param mixed $rlce2
* @return TraitementDsDemdDachat
*/
public function setRlce2(?string $rlce2): self
{
$this->rlce2 = $rlce2;
return $this;
}
/**
* @return mixed
*/
public function getRlce3():?string
{
return $this->rlce3;
}
/**
* @param mixed $rlce3
* @return TraitementDsDemdDachat
*/
public function setRlce3(?string $rlce3): self
{
$this->rlce3 = $rlce3;
return $this;
}
/**
* @return mixed
*/
public function getTel():?string
{
return $this->tel;
}
/**
* @param mixed $tel
* @return TraitementDsDemdDachat
*/
public function setTel(?string $tel): self
{
$this->tel = $tel;
return $this;
}
/**
* @return mixed
*/
public function getEmail():?string
{
return $this->email;
}
/**
* @param mixed $email
* @return TraitementDsDemdDachat
*/
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
/**
* @return mixed
*/
public function getWebsite():?string
{
return $this->website;
}
/**
* @param mixed $website
* @return TraitementDsDemdDachat
*/
public function setWebsite(?string $website): self
{
$this->website = $website;
return $this;
}
/**
* @return mixed
*/
public function getMailEnvoye():?string
{
return $this->mail_envoye;
}
/**
* @param mixed $mail_envoye
* @return TraitementDsDemdDachat
*/
public function setMailEnvoye(?string $mail_envoye): self
{
$this->mail_envoye = $mail_envoye;
return $this;
}
/**
* @return mixed
*/
public function getAppelArg():?string
{
return $this->appel_arg;
}
/**
* @param mixed $appel_arg
* @return TraitementDsDemdDachat
*/
public function setAppelArg(?string $appel_arg): self
{
$this->appel_arg = $appel_arg;
return $this;
}
/**
* @return mixed
*/
public function getSociete():?string
{
return $this->societe;
}
/**
* @param mixed $societe
* @return TraitementDsDemdDachat
*/
public function setSociete(?string $societe): self
{
$this->societe = $societe;
return $this;
}
/**
* @return mixed
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* @param mixed $createdAt
* @return TraitementDsDemdDachat
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* @return mixed
*/
public function getRdvPhysique()
{
return $this->rdv_physique;
}
/**
* @param mixed $rdv_physique
* @return TraitementDsDemdDachat
*/
public function setRdvPhysique(?string $rdv_physique): self
{
$this->rdv_physique = $rdv_physique;
return $this;
}
public function __toString(){
return $this->numero;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getSousJacent(): ?SousJacent
{
return $this->sous_jacent;
}
public function setSousJacent(?SousJacent $sous_jacent): self
{
$this->sous_jacent = $sous_jacent;
return $this;
}
public function getStatus(): ?Status
{
return $this->status;
}
public function setStatus(?Status $status): self
{
$this->status = $status;
return $this;
}
public function getAgent(): ?User
{
return $this->agent;
}
public function setAgent(?User $agent): self
{
$this->agent = $agent;
return $this;
}
public function getNiveau(): ?Niveau
{
return $this->niveau;
}
public function setNiveau(?Niveau $niveau): self
{
$this->niveau = $niveau;
return $this;
}
public function getPlaceDeMarche(): ?PlaceDeMarche
{
return $this->place_de_marche;
}
public function setPlaceDeMarche(?PlaceDeMarche $place_de_marche): self
{
$this->place_de_marche = $place_de_marche;
return $this;
}
public function getProduit(): ?Products
{
return $this->produit;
}
public function setProduit(?Products $produit): self
{
$this->produit = $produit;
return $this;
}
}