src/Entity/Facture.php line 12

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\FactureRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassFactureRepository::class)]
  9. class Facture
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\ManyToOne(inversedBy'factures')]
  16.     private ?Camion $camion null;
  17.     #[ORM\ManyToOne(inversedBy'factures')]
  18.     private ?Remorque $remorque null;
  19.     #[ORM\Column(length255)]
  20.     private ?string $nameFile null;
  21.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  22.     private ?\DateTimeInterface $date null;
  23.     #[ORM\Column(typeTypes::TEXT)]
  24.     private ?string $text null;
  25.     #[ORM\Column]
  26.     private ?int $valide null;
  27.     #[ORM\Column]
  28.     private ?int $vidange null;
  29.     #[ORM\Column]
  30.     private ?int $filtreHuile null;
  31.     #[ORM\Column]
  32.     private ?int $filtreAir null;
  33.     #[ORM\Column]
  34.     private ?int $filtreGO null;
  35.     #[ORM\Column]
  36.     private ?int $courroie null;
  37.     #[ORM\Column(typeTypes::DECIMALprecision10scale'0')]
  38.     private ?string $prix null;
  39.     #[ORM\Column]
  40.     private ?int $heureMoteur null;
  41.     #[ORM\OneToMany(mappedBy'facture'targetEntityFactureDocument::class)]
  42.     private Collection $factureDocuments;
  43.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  44.     private ?\DateTimeInterface $createdAt null;
  45.     #[ORM\Column]
  46.     private ?int $sinistre null;
  47.     #[ORM\ManyToOne(inversedBy'factures')]
  48.     private ?Divers $divers null;
  49.     public function __construct()
  50.     {
  51.         $this->factureDocuments = new ArrayCollection();
  52.     }
  53.     public function getId(): ?int
  54.     {
  55.         return $this->id;
  56.     }
  57.     public function getCamion(): ?Camion
  58.     {
  59.         return $this->camion;
  60.     }
  61.     public function setCamion(?Camion $camion): self
  62.     {
  63.         $this->camion $camion;
  64.         return $this;
  65.     }
  66.     public function getRemorque(): ?Remorque
  67.     {
  68.         return $this->remorque;
  69.     }
  70.     public function setRemorque(?Remorque $remorque): self
  71.     {
  72.         $this->remorque $remorque;
  73.         return $this;
  74.     }
  75.     public function getNameFile(): ?string
  76.     {
  77.         return $this->nameFile;
  78.     }
  79.     public function setNameFile(string $nameFile): self
  80.     {
  81.         $this->nameFile $nameFile;
  82.         return $this;
  83.     }
  84.     public function getDate(): ?\DateTimeInterface
  85.     {
  86.         return $this->date;
  87.     }
  88.     public function setDate(\DateTimeInterface $date): self
  89.     {
  90.         $this->date $date;
  91.         return $this;
  92.     }
  93.     public function getText(): ?string
  94.     {
  95.         return $this->text;
  96.     }
  97.     public function setText(string $text): self
  98.     {
  99.         $this->text $text;
  100.         return $this;
  101.     }
  102.     public function getValide(): ?int
  103.     {
  104.         return $this->valide;
  105.     }
  106.     public function setValide(int $valide): self
  107.     {
  108.         $this->valide $valide;
  109.         return $this;
  110.     }
  111.     public function getExtension(): ?string
  112.     {
  113.         $exp explode('.',$this->getNameFile());
  114.         $ext end($exp);
  115.         return $ext;
  116.     }
  117.     public function getVidange(): ?int
  118.     {
  119.         return $this->vidange;
  120.     }
  121.     public function setVidange(int $vidange): self
  122.     {
  123.         $this->vidange $vidange;
  124.         return $this;
  125.     }
  126.     public function getFiltreHuile(): ?int
  127.     {
  128.         return $this->filtreHuile;
  129.     }
  130.     public function setFiltreHuile(int $filtreHuile): self
  131.     {
  132.         $this->filtreHuile $filtreHuile;
  133.         return $this;
  134.     }
  135.     public function getFiltreAir(): ?int
  136.     {
  137.         return $this->filtreAir;
  138.     }
  139.     public function setFiltreAir(int $filtreAir): self
  140.     {
  141.         $this->filtreAir $filtreAir;
  142.         return $this;
  143.     }
  144.     public function getFiltreGO(): ?int
  145.     {
  146.         return $this->filtreGO;
  147.     }
  148.     public function setFiltreGO(int $filtreGO): self
  149.     {
  150.         $this->filtreGO $filtreGO;
  151.         return $this;
  152.     }
  153.     public function getCourroie(): ?int
  154.     {
  155.         return $this->courroie;
  156.     }
  157.     public function setCourroie(int $courroie): self
  158.     {
  159.         $this->courroie $courroie;
  160.         return $this;
  161.     }
  162.     public function getPrix(): ?string
  163.     {
  164.         return $this->prix;
  165.     }
  166.     public function setPrix(string $prix): self
  167.     {
  168.         $this->prix $prix;
  169.         return $this;
  170.     }
  171.     public function getHeureMoteur(): ?int
  172.     {
  173.         return $this->heureMoteur;
  174.     }
  175.     public function setHeureMoteur(int $heureMoteur): self
  176.     {
  177.         $this->heureMoteur $heureMoteur;
  178.         return $this;
  179.     }
  180.     /**
  181.      * @return Collection<int, FactureDocument>
  182.      */
  183.     public function getFactureDocuments(): Collection
  184.     {
  185.         return $this->factureDocuments;
  186.     }
  187.     public function addFactureDocument(FactureDocument $factureDocument): self
  188.     {
  189.         if (!$this->factureDocuments->contains($factureDocument)) {
  190.             $this->factureDocuments->add($factureDocument);
  191.             $factureDocument->setFacture($this);
  192.         }
  193.         return $this;
  194.     }
  195.     public function removeFactureDocument(FactureDocument $factureDocument): self
  196.     {
  197.         if ($this->factureDocuments->removeElement($factureDocument)) {
  198.             // set the owning side to null (unless already changed)
  199.             if ($factureDocument->getFacture() === $this) {
  200.                 $factureDocument->setFacture(null);
  201.             }
  202.         }
  203.         return $this;
  204.     }
  205.     public function getCreatedAt(): ?\DateTimeInterface
  206.     {
  207.         return $this->createdAt;
  208.     }
  209.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  210.     {
  211.         $this->createdAt $createdAt;
  212.         return $this;
  213.     }
  214.     public function getSinistre(): ?int
  215.     {
  216.         return $this->sinistre;
  217.     }
  218.     public function setSinistre(int $sinistre): static
  219.     {
  220.         $this->sinistre $sinistre;
  221.         return $this;
  222.     }
  223.     public function getDivers(): ?Divers
  224.     {
  225.         return $this->divers;
  226.     }
  227.     public function setDivers(?Divers $divers): static
  228.     {
  229.         $this->divers $divers;
  230.         return $this;
  231.     }
  232. }