src/Entity/Pays.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PaysRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. #[ORM\Entity(repositoryClassPaysRepository::class)]
  9. class Pays
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column(type'integer')]
  14.     private $id;
  15.     #[ORM\Column(type'string'length255nullabletrue)]
  16.     private $code;
  17.     #[ORM\Column(type'string'length255)]
  18.     private $nom;
  19.     #[ORM\Column(type'string'length255nullabletrue)]
  20.     private $logo;
  21.     #[Gedmo\Timestampable(on'create')]
  22.     #[ORM\Column(type'datetime')]
  23.     private $created_at;
  24.     #[Gedmo\Timestampable(on'update')]
  25.     #[ORM\Column(type'datetime')]
  26.     private $updated_at;
  27.     #[ORM\Column(type'integer')]
  28.     private $created_by;
  29.     #[ORM\Column(type'integer')]
  30.     private $updated_by;
  31.     #[ORM\OneToMany(mappedBy'pays'targetEntityPtf::class)]
  32.     private $ptfs;
  33.     #[ORM\Column(length255nullabletrue)]
  34.     private ?string $email null;
  35.     #[ORM\Column(length255nullabletrue)]
  36.     private ?string $url null;
  37.     #[ORM\OneToMany(mappedBy'pays'targetEntityTroika::class)]
  38.     private Collection $troikas;
  39.     public function __construct()
  40.     {
  41.         $this->ptfs = new ArrayCollection();
  42.         $this->troikas = new ArrayCollection();
  43.     }
  44.     public function getId(): ?int
  45.     {
  46.         return $this->id;
  47.     }
  48.     public function getCode(): ?string
  49.     {
  50.         return $this->code;
  51.     }
  52.     public function setCode(?string $code): self
  53.     {
  54.         $this->code $code;
  55.         return $this;
  56.     }
  57.     public function getNom(): ?string
  58.     {
  59.         return $this->nom;
  60.     }
  61.     public function setNom(string $nom): self
  62.     {
  63.         $this->nom $nom;
  64.         return $this;
  65.     }
  66.     public function getLogo(): ?string
  67.     {
  68.         return $this->logo;
  69.     }
  70.     public function setLogo(?string $logo): self
  71.     {
  72.         $this->logo $logo;
  73.         return $this;
  74.     }
  75.     public function getCreatedAt(): ?\DateTimeInterface
  76.     {
  77.         return $this->created_at;
  78.     }
  79.     public function setCreatedAt(\DateTimeInterface $created_at): self
  80.     {
  81.         $this->created_at $created_at;
  82.         return $this;
  83.     }
  84.     public function getUpdatedAt(): ?\DateTimeInterface
  85.     {
  86.         return $this->updated_at;
  87.     }
  88.     public function setUpdatedAt(\DateTimeInterface $updated_at): self
  89.     {
  90.         $this->updated_at $updated_at;
  91.         return $this;
  92.     }
  93.     public function getCreatedBy(): ?int
  94.     {
  95.         return $this->created_by;
  96.     }
  97.     public function setCreatedBy(int $created_by): self
  98.     {
  99.         $this->created_by $created_by;
  100.         return $this;
  101.     }
  102.     public function getUpdatedBy(): ?int
  103.     {
  104.         return $this->updated_by;
  105.     }
  106.     public function setUpdatedBy(int $updated_by): self
  107.     {
  108.         $this->updated_by $updated_by;
  109.         return $this;
  110.     }
  111.     /**
  112.      * @return Collection<int, Ptf>
  113.      */
  114.     public function getPtfs(): Collection
  115.     {
  116.         return $this->ptfs;
  117.     }
  118.     public function addPtf(Ptf $ptf): self
  119.     {
  120.         if (!$this->ptfs->contains($ptf)) {
  121.             $this->ptfs[] = $ptf;
  122.             $ptf->setPays($this);
  123.         }
  124.         return $this;
  125.     }
  126.     public function removePtf(Ptf $ptf): self
  127.     {
  128.         if ($this->ptfs->removeElement($ptf)) {
  129.             // set the owning side to null (unless already changed)
  130.             if ($ptf->getPays() === $this) {
  131.                 $ptf->setPays(null);
  132.             }
  133.         }
  134.         return $this;
  135.     }
  136.     public function getEmail(): ?string
  137.     {
  138.         return $this->email;
  139.     }
  140.     public function setEmail(?string $email): self
  141.     {
  142.         $this->email $email;
  143.         return $this;
  144.     }
  145.     public function getUrl(): ?string
  146.     {
  147.         return $this->url;
  148.     }
  149.     public function setUrl(?string $url): self
  150.     {
  151.         $this->url $url;
  152.         return $this;
  153.     }
  154.     /**
  155.      * @return Collection<int, Troika>
  156.      */
  157.     public function getTroikas(): Collection
  158.     {
  159.         return $this->troikas;
  160.     }
  161.     public function addTroika(Troika $troika): self
  162.     {
  163.         if (!$this->troikas->contains($troika)) {
  164.             $this->troikas->add($troika);
  165.             $troika->setPays($this);
  166.         }
  167.         return $this;
  168.     }
  169.     public function removeTroika(Troika $troika): self
  170.     {
  171.         if ($this->troikas->removeElement($troika)) {
  172.             // set the owning side to null (unless already changed)
  173.             if ($troika->getPays() === $this) {
  174.                 $troika->setPays(null);
  175.             }
  176.         }
  177.         return $this;
  178.     }
  179. }