<?php
namespace App\Entity;
use App\Repository\DevisRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=DevisRepository::class)
*/
class Devis
{
public const NOTES = [
'Termes & conditions au verso',
'Garantie 12 mois',
'Paiement comptant via Orange Money',
'Be500 inclus (50 sms gratuit - 2h appel gratuit - 1Go offert)',
'Disponible en stock sauf vente entre temps',
'Validité : 2 mois'
];
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $numero;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $titre;
/**
* @ORM\Column(type="string", length=255)
*/
private $montant;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $description;
/**
* @ORM\Column(type="array", nullable=true)
*/
private $piece_jointe = [];
/**
* @ORM\ManyToOne(targetEntity=Client::class, inversedBy="devis")
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
*/
private $client;
/**
* @ORM\ManyToOne(targetEntity=Produit::class, inversedBy="devis")
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
*/
private $produit;
/**
* @ORM\Column(type="date")
*/
private $date;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $notePublique;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $notePrivee;
public function getId(): ?int
{
return $this->id;
}
public function getNumero(): ?string
{
return $this->numero;
}
public function setNumero(string $numero): self
{
$this->numero = $numero;
return $this;
}
public function getTitre(): ?string
{
return $this->titre;
}
public function setTitre(?string $titre): self
{
$this->titre = $titre;
return $this;
}
public function getMontant(): ?string
{
return $this->montant;
}
public function setMontant(string $montant): self
{
$this->montant = $montant;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getPieceJointe(): ?array
{
return $this->piece_jointe;
}
public function setPieceJointe(?array $piece_jointe): self
{
$this->piece_jointe = $piece_jointe;
return $this;
}
public function getClient(): ?Client
{
return $this->client;
}
public function setClient(?Client $client): self
{
$this->client = $client;
return $this;
}
public function getProduit(): ?Produit
{
return $this->produit;
}
public function setProduit(?Produit $produit): self
{
$this->produit = $produit;
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function getNotePublique(): ?string
{
return $this->notePublique;
}
public function setNotePublique(?string $notePublique): self
{
$this->notePublique = $notePublique;
return $this;
}
public function getNotePrivee(): ?string
{
return $this->notePrivee;
}
public function setNotePrivee(?string $notePrivee): self
{
$this->notePrivee = $notePrivee;
return $this;
}
}