<?php
namespace App\Entity;
use App\Utils\SharedMethods;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\DemandeDeCotationRepository")
*/
class DemandeDeCotation
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $number;
/**
* @ORM\Column(type="string", length=255)
*/
private $denomination;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $rcsiren;
/**
* @ORM\Column(type="string", length=255)
*/
private $telephone;
/**
* @ORM\Column(type="string", length=255)
*/
private $representantlegal;
/**
* @ORM\Column(type="string", length=255)
*/
private $pays;
/**
* @ORM\Column(type="string", length=255)
*/
private $courriel;
/**
* @ORM\Column(type="string", length=255)
*/
private $origine;
/**
* @ORM\Column(type="string", length=255)
*/
private $prixcible;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Emballage", inversedBy="demandeDeCotations")
*/
private $emballage;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Conditionnement", inversedBy="demandeDeCotations")
*/
private $conditionnement;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\PaymentMethod", inversedBy="demandeDeCotations")
*/
private $modedepayement;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $condition;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $delai;
/**
* @ORM\Column(type="string", length=255)
*/
private $destination;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $exigence;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $demand_at;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="demandeDeCotations")
*/
private $user;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Status", inversedBy="demandeDeCotations")
*/
private $status;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Products", inversedBy="demandeDeCotations")
*/
private $product;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\SousJacent", inversedBy="demandeDeCotations")
*/
private $sousjacent;
public function __construct()
{
$this->createdAt = new \DateTime('now');
$this->number = SharedMethods::generateNumber($this->number, "DDC");
}
public function getId(): ?int
{
return $this->id;
}
public function getNumber(): ?string
{
return $this->number;
}
public function setNumber(string $number): self
{
$this->number = $number;
return $this;
}
public function getDenomination(): ?string
{
return $this->denomination;
}
public function setDenomination(string $denomination): self
{
$this->denomination = $denomination;
return $this;
}
public function getRcsiren(): ?string
{
return $this->rcsiren;
}
public function setRcsiren(?string $rcsiren): self
{
$this->rcsiren = $rcsiren;
return $this;
}
public function getTelephone(): ?string
{
return $this->telephone;
}
public function setTelephone(string $telephone): self
{
$this->telephone = $telephone;
return $this;
}
public function getRepresentantlegal(): ?string
{
return $this->representantlegal;
}
public function setRepresentantlegal(string $representantlegal): self
{
$this->representantlegal = $representantlegal;
return $this;
}
public function getPays(): ?string
{
return $this->pays;
}
public function setPays(string $pays): self
{
$this->pays = $pays;
return $this;
}
public function getCourriel(): ?string
{
return $this->courriel;
}
public function setCourriel(string $courriel): self
{
$this->courriel = $courriel;
return $this;
}
public function getOrigine(): ?string
{
return $this->origine;
}
public function setOrigine(string $origine): self
{
$this->origine = $origine;
return $this;
}
public function getPrixcible(): ?string
{
return $this->prixcible;
}
public function setPrixcible(string $prixcible): self
{
$this->prixcible = $prixcible;
return $this;
}
public function getEmballage(): ?Emballage
{
return $this->emballage;
}
public function setEmballage(?Emballage $emballage): self
{
$this->emballage = $emballage;
return $this;
}
public function getConditionnement(): ?Conditionnement
{
return $this->conditionnement;
}
public function setConditionnement(?Conditionnement $conditionnement): self
{
$this->conditionnement = $conditionnement;
return $this;
}
public function getModedepayement(): ?PaymentMethod
{
return $this->modedepayement;
}
public function setModedepayement(?PaymentMethod $modedepayement): self
{
$this->modedepayement = $modedepayement;
return $this;
}
public function getCondition(): ?string
{
return $this->condition;
}
public function setCondition(?string $condition): self
{
$this->condition = $condition;
return $this;
}
public function getDelai(): ?string
{
return $this->delai;
}
public function setDelai(?string $delai): self
{
$this->delai = $delai;
return $this;
}
public function getDestination(): ?string
{
return $this->destination;
}
public function setDestination(string $destination): self
{
$this->destination = $destination;
return $this;
}
public function getExigence(): ?string
{
return $this->exigence;
}
public function setExigence(?string $exigence): self
{
$this->exigence = $exigence;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getDemandAt(): ?\DateTimeInterface
{
return $this->demand_at;
}
public function setDemandAt(?\DateTimeInterface $demand_at): self
{
$this->demand_at = $demand_at;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getStatus(): ?Status
{
return $this->status;
}
public function setStatus(?Status $status): self
{
$this->status = $status;
return $this;
}
public function getProduct(): ?Products
{
return $this->product;
}
public function setProduct(?Products $product): self
{
$this->product = $product;
return $this;
}
public function getSousjacent(): ?SousJacent
{
return $this->sousjacent;
}
public function setSousjacent(?SousJacent $sousjacent): self
{
$this->sousjacent = $sousjacent;
return $this;
}
}