src/Entity/LigneDevis.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\LigneDevisRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=LigneDevisRepository::class)
  9.  */
  10. class LigneDevis
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity=EnteteDevis::class, inversedBy="ligneDevis")
  20.      */
  21.     private $entetedevis;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity=Formation::class)
  24.      */
  25.     private $formation;
  26.     /**
  27.      * @ORM\Column(type="integer", nullable=true)
  28.      */
  29.     private $quantity;
  30.     /**
  31.      * @ORM\Column(type="float", nullable=true)
  32.      */
  33.     private $price;
  34.     /**
  35.      * @ORM\Column(type="float", nullable=true)
  36.      */
  37.     private $amount;
  38.     /**
  39.      * @ORM\Column(type="string", length=255, nullable=true)
  40.      */
  41.     private $name;
  42.     /**
  43.      * @ORM\Column(type="datetime_immutable", nullable=true)
  44.      */
  45.     private $created_at;
  46.     /**
  47.      * @ORM\Column(type="float", nullable=true)
  48.      */
  49.     private $remise;
  50.     /**
  51.      * @ORM\Column(type="float", nullable=true)
  52.      */
  53.     private $tva;
  54.     /**
  55.      * @ORM\Column(type="float", nullable=true)
  56.      */
  57.     private $amountht;
  58.     /**
  59.      * @ORM\ManyToOne(targetEntity=Session::class, inversedBy="ligneDevis")
  60.      */
  61.     private $session;
  62.     /**
  63.      * @ORM\OneToMany(targetEntity=LigneConvention::class, mappedBy="devis")
  64.      */
  65.     private $ligneConventions;
  66.     public function __construct()
  67.     {
  68.         $this->ligneConventions = new ArrayCollection();
  69.     }
  70.     public function getId(): ?int
  71.     {
  72.         return $this->id;
  73.     }
  74.     public function getEntetedevis(): ?EnteteDevis
  75.     {
  76.         return $this->entetedevis;
  77.     }
  78.     public function setEntetedevis(?EnteteDevis $entetedevis): self
  79.     {
  80.         $this->entetedevis $entetedevis;
  81.         return $this;
  82.     }
  83.     public function getFormation(): ?Formation
  84.     {
  85.         return $this->formation;
  86.     }
  87.     public function setFormation(?Formation $formation): self
  88.     {
  89.         $this->formation $formation;
  90.         return $this;
  91.     }
  92.     public function getQuantity(): ?int
  93.     {
  94.         return $this->quantity;
  95.     }
  96.     public function setQuantity(?int $quantity): self
  97.     {
  98.         $this->quantity $quantity;
  99.         return $this;
  100.     }
  101.     public function getPrice(): ?float
  102.     {
  103.         return $this->price;
  104.     }
  105.     public function setPrice(?float $price): self
  106.     {
  107.         $this->price $price;
  108.         return $this;
  109.     }
  110.     public function getAmount(): ?float
  111.     {
  112.         return $this->amount;
  113.     }
  114.     public function setAmount(?float $amount): self
  115.     {
  116.         $this->amount $amount;
  117.         return $this;
  118.     }
  119.     public function getName(): ?string
  120.     {
  121.         return $this->name;
  122.     }
  123.     public function setName(?string $name): self
  124.     {
  125.         $this->name $name;
  126.         return $this;
  127.     }
  128.     public function getCreatedAt(): ?\DateTimeImmutable
  129.     {
  130.         return $this->created_at;
  131.     }
  132.     public function setCreatedAt(?\DateTimeImmutable $created_at): self
  133.     {
  134.         $this->created_at $created_at;
  135.         return $this;
  136.     }
  137.     public function getRemise(): ?float
  138.     {
  139.         return $this->remise;
  140.     }
  141.     public function setRemise(?float $remise): self
  142.     {
  143.         $this->remise $remise;
  144.         return $this;
  145.     }
  146.     public function getTva(): ?float
  147.     {
  148.         return $this->tva;
  149.     }
  150.     public function setTva(?float $tva): self
  151.     {
  152.         $this->tva $tva;
  153.         return $this;
  154.     }
  155.     public function getAmountht(): ?float
  156.     {
  157.         return $this->amountht;
  158.     }
  159.     public function setAmountht(?float $amountht): self
  160.     {
  161.         $this->amountht $amountht;
  162.         return $this;
  163.     }
  164.     public function getSession(): ?Session
  165.     {
  166.         return $this->session;
  167.     }
  168.     public function setSession(?Session $session): self
  169.     {
  170.         $this->session $session;
  171.         return $this;
  172.     }
  173.     /**
  174.      * @return Collection<int, LigneConvention>
  175.      */
  176.     public function getLigneConventions(): Collection
  177.     {
  178.         return $this->ligneConventions;
  179.     }
  180.     public function addLigneConvention(LigneConvention $ligneConvention): self
  181.     {
  182.         if (!$this->ligneConventions->contains($ligneConvention)) {
  183.             $this->ligneConventions[] = $ligneConvention;
  184.             $ligneConvention->setDevis($this);
  185.         }
  186.         return $this;
  187.     }
  188.     public function removeLigneConvention(LigneConvention $ligneConvention): self
  189.     {
  190.         if ($this->ligneConventions->removeElement($ligneConvention)) {
  191.             // set the owning side to null (unless already changed)
  192.             if ($ligneConvention->getDevis() === $this) {
  193.                 $ligneConvention->setDevis(null);
  194.             }
  195.         }
  196.         return $this;
  197.     }
  198. }