src/Entity/Projets.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProjetsRepository;
  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(repositoryClassProjetsRepository::class)]
  9. class Projets
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $nom null;
  17.     #[ORM\Column(length255)]
  18.     private ?string $moa null;
  19.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  20.     private ?\DateTimeInterface $dateCreation null;
  21.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  22.     private ?\DateTimeInterface $dateAchevement null;
  23.     #[ORM\ManyToOne]
  24.     private ?User $user null;
  25.     #[ORM\OneToMany(mappedBy'projets'targetEntityLogements::class)]
  26.     private Collection $logements;
  27.     #[ORM\Column(length255)]
  28.     private ?string $nomEntreprise null;
  29.     #[ORM\Column]
  30.     private ?bool $actif null;
  31.     public function __construct()
  32.     {
  33.         $this->logements = new ArrayCollection();
  34.     }
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getNom(): ?string
  40.     {
  41.         return $this->nom;
  42.     }
  43.     public function setNom(string $nom): self
  44.     {
  45.         $this->nom $nom;
  46.         return $this;
  47.     }
  48.     public function getMoa(): ?string
  49.     {
  50.         return $this->moa;
  51.     }
  52.     public function setMoa(string $moa): self
  53.     {
  54.         $this->moa $moa;
  55.         return $this;
  56.     }
  57.     public function getDateCreation(): ?\DateTimeInterface
  58.     {
  59.         return $this->dateCreation;
  60.     }
  61.     public function setDateCreation(\DateTimeInterface $dateCreation): self
  62.     {
  63.         $this->dateCreation $dateCreation;
  64.         return $this;
  65.     }
  66.     public function getDateAchevement(): ?\DateTimeInterface
  67.     {
  68.         return $this->dateAchevement;
  69.     }
  70.     public function setDateAchevement(\DateTimeInterface $dateAchevement): self
  71.     {
  72.         $this->dateAchevement $dateAchevement;
  73.         return $this;
  74.     }
  75.     public function getUser(): ?User
  76.     {
  77.         return $this->user;
  78.     }
  79.     public function setUser(?User $user): self
  80.     {
  81.         $this->user $user;
  82.         return $this;
  83.     }
  84.     /**
  85.      * @return Collection<int, Logements>
  86.      */
  87.     public function getLogements(): Collection
  88.     {
  89.         return $this->logements;
  90.     }
  91.     public function addLogement(Logements $logement): self
  92.     {
  93.         if (!$this->logements->contains($logement)) {
  94.             $this->logements->add($logement);
  95.             $logement->setProjets($this);
  96.         }
  97.         return $this;
  98.     }
  99.     public function removeLogement(Logements $logement): self
  100.     {
  101.         if ($this->logements->removeElement($logement)) {
  102.             // set the owning side to null (unless already changed)
  103.             if ($logement->getProjets() === $this) {
  104.                 $logement->setProjets(null);
  105.             }
  106.         }
  107.         return $this;
  108.     }
  109.     public function getNomEntreprise(): ?string
  110.     {
  111.         return $this->nomEntreprise;
  112.     }
  113.     public function setNomEntreprise(string $nomEntreprise): self
  114.     {
  115.         $this->nomEntreprise $nomEntreprise;
  116.         return $this;
  117.     }
  118.     public function isActif(): ?bool
  119.     {
  120.         return $this->actif;
  121.     }
  122.     public function setActif(bool $actif): self
  123.     {
  124.         $this->actif $actif;
  125.         return $this;
  126.     }
  127. }