<?phpnamespace App\Entity;use App\Repository\FactureRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: FactureRepository::class)]class Facture{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $nom = null; #[ORM\Column(length: 255)] private ?string $prenom = null; #[ORM\Column] private ?float $total = null; #[ORM\Column(nullable: true)] private ?float $discount = null; #[ORM\Column(type: Types::DATETIME_MUTABLE)] private ?\DateTimeInterface $datedefacture = null; #[ORM\Column(length: 255, nullable: true)] private ?string $phonenumber = null; #[ORM\Column(length: 255)] private ?string $fullAddresse = null; #[ORM\OneToOne(mappedBy: 'facture', cascade: ['persist', 'remove'])] private ?Commande $commande = null; // montantTVA ,montantTTC to add public function __construct() { // <// Définir l'état initial } 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 getPrenom(): ?string { return $this->prenom; } public function setPrenom(string $prenom): self { $this->prenom = $prenom; return $this; } public function getTotal(): ?float { return $this->total; } public function setTotal(float $total): self { $this->total = $total; return $this; } public function getDiscount(): ?float { return $this->discount; } public function setDiscount(?float $discount): self { $this->discount = $discount; return $this; } public function getDatedefacture(): ?\DateTimeInterface { return $this->datedefacture; } public function setDatedefacture(\DateTimeInterface $datedefacture): self { $this->datedefacture = $datedefacture; return $this; } public function getPhonenumber(): ?string { return $this->phonenumber; } public function setPhonenumber(?string $phonenumber): self { $this->phonenumber = $phonenumber; return $this; } public function getFullAddresse(): ?string { return $this->fullAddresse; } public function setFullAddresse(string $fullAddresse): self { $this->fullAddresse = $fullAddresse; return $this; } public function getCommande(): ?Commande { return $this->commande; } public function setCommande(?Commande $commande): self { // unset the owning side of the relation if necessary if ($commande === null && $this->commande !== null) { $this->commande->setFacture(null); } // set the owning side of the relation if necessary if ($commande !== null && $commande->getFacture() !== $this) { $commande->setFacture($this); } $this->commande = $commande; return $this; }}