src/Entity/PNaturesalarieCab.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PNaturesalarieCabRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassPNaturesalarieCabRepository::class)]
  8. class PNaturesalarieCab
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255)]
  15.     private ?string $Nature null;
  16.     #[ORM\Column(length100)]
  17.     private ?string $Type null;
  18.     #[ORM\OneToMany(mappedBy'id_nature_sal'targetEntityPNaturesalarieDet::class)]
  19.     private Collection $pNaturesalaries;
  20.     #[ORM\OneToMany(mappedBy'nature_sal_id'targetEntityPbareme::class)]
  21.     private Collection $pbaremes;
  22.    
  23.     public function __construct()
  24.     {
  25.         $this->pNaturesalaries = new ArrayCollection();
  26.         $this->pbaremes = new ArrayCollection();
  27.     }
  28.     public function getId(): ?int
  29.     {
  30.         return $this->id;
  31.     }
  32.     public function getNature(): ?string
  33.     {
  34.         return $this->Nature;
  35.     }
  36.     public function setNature(string $Nature): self
  37.     {
  38.         $this->Nature $Nature;
  39.         return $this;
  40.     }
  41.     public function getType(): ?string
  42.     {
  43.         return $this->Type;
  44.     }
  45.     public function setType(string $Type): self
  46.     {
  47.         $this->Type $Type;
  48.         return $this;
  49.     }
  50.   
  51.     /**
  52.      * @return Collection<int, PNaturesalarie>
  53.      */
  54.     public function getPNaturesalaries(): Collection
  55.     {
  56.         return $this->pNaturesalaries;
  57.     }
  58.     public function addPNaturesalary(PNaturesalarieDet $pNaturesalary): self
  59.     {
  60.         if (!$this->pNaturesalaries->contains($pNaturesalary)) {
  61.             $this->pNaturesalaries->add($pNaturesalary);
  62.             $pNaturesalary->setIdNatureSal($this);
  63.         }
  64.         return $this;
  65.     }
  66.     public function removePNaturesalary(PNaturesalarieDet $pNaturesalary): self
  67.     {
  68.         if ($this->pNaturesalaries->removeElement($pNaturesalary)) {
  69.             // set the owning side to null (unless already changed)
  70.             if ($pNaturesalary->getIdNatureSal() === $this) {
  71.                 $pNaturesalary->setIdNatureSal(null);
  72.             }
  73.         }
  74.         return $this;
  75.     }
  76.     /**
  77.      * @return Collection<int, Pbareme>
  78.      */
  79.     public function getPbaremes(): Collection
  80.     {
  81.         return $this->pbaremes;
  82.     }
  83.     public function addPbareme(Pbareme $pbareme): self
  84.     {
  85.         if (!$this->pbaremes->contains($pbareme)) {
  86.             $this->pbaremes->add($pbareme);
  87.             $pbareme->setNatureSalId($this);
  88.         }
  89.         return $this;
  90.     }
  91.     public function removePbareme(Pbareme $pbareme): self
  92.     {
  93.         if ($this->pbaremes->removeElement($pbareme)) {
  94.             // set the owning side to null (unless already changed)
  95.             if ($pbareme->getNatureSalId() === $this) {
  96.                 $pbareme->setNatureSalId(null);
  97.             }
  98.         }
  99.         return $this;
  100.     }
  101.    
  102. }