src/Entity/Facture.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\FactureRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassFactureRepository::class)]
  7. class Facture
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column(length255)]
  14.     private ?string $nom null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $prenom null;
  17.     #[ORM\Column]
  18.     private ?float $total null;
  19.     #[ORM\Column(nullabletrue)]
  20.     private ?float $discount null;
  21.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  22.     private ?\DateTimeInterface $datedefacture null;
  23.     #[ORM\Column(length255nullabletrue)]
  24.     private ?string $phonenumber null;
  25.     #[ORM\Column(length255)]
  26.     private ?string $fullAddresse null;
  27.     #[ORM\OneToOne(mappedBy'facture'cascade: ['persist''remove'])]
  28.     private ?Commande $commande null;
  29.     
  30.     // montantTVA ,montantTTC to add 
  31.     public function __construct()
  32.     {   
  33.         // <// Définir l'état initial
  34.     }
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getNom(): ?string
  40.     {
  41.         return $this->nom;
  42.     }
  43.     public function setNom(string $nom): self
  44.     {
  45.         $this->nom $nom;
  46.         return $this;
  47.     }
  48.     public function getPrenom(): ?string
  49.     {
  50.         return $this->prenom;
  51.     }
  52.     public function setPrenom(string $prenom): self
  53.     {
  54.         $this->prenom $prenom;
  55.         return $this;
  56.     }
  57.     public function getTotal(): ?float
  58.     {
  59.         return $this->total;
  60.     }
  61.     public function setTotal(float $total): self
  62.     {
  63.         $this->total $total;
  64.         return $this;
  65.     }
  66.     public function getDiscount(): ?float
  67.     {
  68.         return $this->discount;
  69.     }
  70.     public function setDiscount(?float $discount): self
  71.     {
  72.         $this->discount $discount;
  73.         return $this;
  74.     }
  75.     public function getDatedefacture(): ?\DateTimeInterface
  76.     {
  77.         return $this->datedefacture;
  78.     }
  79.     public function setDatedefacture(\DateTimeInterface $datedefacture): self
  80.     {
  81.         $this->datedefacture $datedefacture;
  82.         return $this;
  83.     }
  84.     public function getPhonenumber(): ?string
  85.     {
  86.         return $this->phonenumber;
  87.     }
  88.     public function setPhonenumber(?string $phonenumber): self
  89.     {
  90.         $this->phonenumber $phonenumber;
  91.         return $this;
  92.     }
  93.     public function getFullAddresse(): ?string
  94.     {
  95.         return $this->fullAddresse;
  96.     }
  97.     public function setFullAddresse(string $fullAddresse): self
  98.     {
  99.         $this->fullAddresse $fullAddresse;
  100.         return $this;
  101.     }
  102.     public function getCommande(): ?Commande
  103.     {
  104.         return $this->commande;
  105.     }
  106.     public function setCommande(?Commande $commande): self
  107.     {
  108.         // unset the owning side of the relation if necessary
  109.         if ($commande === null && $this->commande !== null) {
  110.             $this->commande->setFacture(null);
  111.         }
  112.         // set the owning side of the relation if necessary
  113.         if ($commande !== null && $commande->getFacture() !== $this) {
  114.             $commande->setFacture($this);
  115.         }
  116.         $this->commande $commande;
  117.         return $this;
  118.     }
  119. }