src/Entity/Devis.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DevisRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassDevisRepository::class)]
  8. class Devis
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length15nullabletrue)]
  15.     private ?string $status null;
  16.     #[ORM\OneToMany(mappedBy'devis'targetEntityPayement::class)]
  17.     private Collection $payements;
  18.     #[ORM\Column]
  19.     private ?int $mainoeuvre null;
  20.     #[ORM\Column]  
  21.     private ?int $prixtotal null;
  22.     
  23.     #[ORM\Column(length255nullabletrue)]
  24.     private ?string $numero null;
  25.     #[ORM\Column(length255)]  
  26.     private ?string $Total_Hors_Taxe null;
  27.     #[ORM\Column(length255)]
  28.     private ?string $TVA null;
  29.     #[ORM\Column]    
  30.     private ?\DateTimeImmutable $createAt null;
  31.     #[ORM\ManyToOne(inversedBy'devis')]
  32.     private ?JobCard $jobCard null;
  33.     public function __construct()
  34.     {
  35.         $this->payements = new ArrayCollection();
  36.         $this->createAt = new \DateTimeImmutable();  
  37.     }
  38.     public function getId(): ?int
  39.     {
  40.         return $this->id;
  41.     }
  42.     public function getStatus(): ?string
  43.     {
  44.         return $this->status;
  45.     }
  46.     public function setStatus(string $status): static
  47.     {
  48.         $this->status $status;
  49.         return $this;
  50.     }   
  51.     
  52.     /**
  53.      * @return Collection<int, Payement>
  54.      */
  55.     public function getPayements(): Collection
  56.     {
  57.         return $this->payements;
  58.     }
  59.     public function addPayement(Payement $payement): static
  60.     {
  61.         if (!$this->payements->contains($payement)) {
  62.             $this->payements->add($payement);
  63.             $payement->setDevis($this);
  64.         }
  65.         return $this;
  66.     }
  67.     public function removePayement(Payement $payement): static
  68.     {
  69.         if ($this->payements->removeElement($payement)) {
  70.             // set the owning side to null (unless already changed)
  71.             if ($payement->getDevis() === $this) {
  72.                 $payement->setDevis(null);
  73.             }
  74.         }
  75.         return $this;
  76.     }
  77.     public function setPrixTotal(int $prixtotal): static
  78.     {
  79.         $this->prixtotal $prixtotal;
  80.         return $this;
  81.     }
  82.     public function getMainOeuvre(): ?int
  83.     {
  84.         return $this->mainoeuvre;
  85.     }
  86.     public function setMainOeuvre(int $mainoeuvre): static
  87.     {
  88.         $this->mainoeuvre $mainoeuvre;
  89.         return $this;
  90.     }
  91.     public function getPrixTotal(): ?int
  92.     {
  93.         return $this->prixtotal;
  94.     } 
  95.   
  96.     public function getNumero(): ?string
  97.     {
  98.         return $this->numero;
  99.     }
  100.     public function setNumero(?string $numero): static
  101.     {
  102.         $this->numero $numero;
  103.         return $this;
  104.     }
  105.     public function getTotalHorsTaxe(): ?string
  106.     {
  107.         return $this->Total_Hors_Taxe;
  108.     }
  109.     public function setTotalHorsTaxe(string $Total_Hors_Taxe): static
  110.     {
  111.         $this->Total_Hors_Taxe $Total_Hors_Taxe;
  112.         return $this;
  113.     }
  114.     public function getTVA(): ?string
  115.     {
  116.         return $this->TVA;
  117.     }
  118.     public function setTVA(string $TVA): static
  119.     {
  120.         $this->TVA $TVA;
  121.         return $this;
  122.     }
  123.     public function getCreateAt(): ?\DateTimeImmutable
  124.     {
  125.         return $this->createAt;
  126.     }
  127.     public function setCreateAt(?\DateTimeImmutable $createAt): static
  128.     {
  129.         $this->createAt $createAt;
  130.         return $this;
  131.     }
  132.     public function getJobCard(): ?JobCard
  133.     {
  134.         return $this->jobCard;
  135.     }
  136.     public function setJobCard(?JobCard $jobCard): static
  137.     {
  138.         $this->jobCard $jobCard;
  139.         return $this;
  140.     } 
  141. }