<?php
namespace App\Entity;
use App\Repository\FacturePropositionRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: FacturePropositionRepository::class)]
class FactureProposition
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $reference;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $lienVersPiece;
#[ORM\Column(type: 'decimal', precision: 12, scale: 2, nullable: true)]
private $montant;
#[ORM\ManyToOne(targetEntity: Proposition::class, inversedBy: 'factures', cascade: ['persist'])]
private $proposition;
public function __toString()
{
$libelle=$this->getReference();
if(!$libelle){ $libelle="non défini";}
return $libelle;
}
public function getId(): ?int
{
return $this->id;
}
public function getReference(): ?string
{
return $this->reference;
}
public function setReference(?string $reference): self
{
$this->reference = $reference;
return $this;
}
public function getLienVersPiece(): ?string
{
return $this->lienVersPiece;
}
public function setLienVersPiece(?string $lienVersPiece): self
{
$this->lienVersPiece = $lienVersPiece;
return $this;
}
public function getMontant(): ?string
{
return $this->montant;
}
public function setMontant(?string $montant): self
{
$this->montant = $montant;
return $this;
}
public function getProposition(): ?Proposition
{
return $this->proposition;
}
public function setProposition(?Proposition $proposition): self
{
$this->proposition = $proposition;
return $this;
}
}