src/Entity/Projets.php line 12
<?phpnamespace App\Entity;use App\Repository\ProjetsRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ProjetsRepository::class)]class Projets{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 100)]private ?string $name = null;#[ORM\Column(type: Types::TEXT)]private ?string $description = null;#[ORM\ManyToOne(inversedBy: 'projets')]private ?Categories $category = null;#[ORM\ManyToOne(inversedBy: 'projets')]private ?Difficultes $difficulty = null;#[ORM\OneToMany(mappedBy: 'projet', targetEntity: UserProjets::class, cascade: ['persist', 'remove'])]private Collection $userProjets;#[ORM\OneToMany(mappedBy: 'projet', targetEntity: ImageSlider::class, cascade: ['persist', 'remove'])]private Collection $imageSliders;#[ORM\Column]private ?bool $isValidated = null;#[ORM\Column(nullable: true)]private ?\DateTimeImmutable $createdAt = null;public function __construct(){$this->userProjets = new ArrayCollection();$this->imageSliders = new ArrayCollection();$this->isValidated = false;}public function getId(): ?int{return $this->id;}public function getName(): ?string{return $this->name;}public function setName(string $name): static{$this->name = $name;return $this;}public function getDescription(): ?string{return $this->description;}public function setDescription(string $description): static{$this->description = $description;return $this;}public function getCategory(): ?Categories{return $this->category;}public function setCategory(?Categories $category): static{$this->category = $category;return $this;}public function getDifficulty(): ?Difficultes{return $this->difficulty;}public function setDifficulty(?Difficultes $difficulty): static{$this->difficulty = $difficulty;return $this;}/*** @return Collection<int, UserProjets>*/public function getUserProjets(): Collection{return $this->userProjets;}public function addUserProjet(UserProjets $userProjet): self{if (!$this->userProjets->contains($userProjet)) {$this->userProjets->add($userProjet);$userProjet->setProjet($this);}return $this;}public function removeUserProjet(UserProjets $userProjet): self{if ($this->userProjets->removeElement($userProjet)) {// set the owning side to null (unless already changed)if ($userProjet->getProjet() === $this) {$userProjet->setProjet(null);}}return $this;}/*** @return Collection<int, ImageSlider>*/public function getImageSliders(): Collection{return $this->imageSliders;}public function addImageSlider(ImageSlider $imageSlider): self{if (!$this->imageSliders->contains($imageSlider)) {$this->imageSliders->add($imageSlider);$imageSlider->setProjet($this);}return $this;}public function removeImageSlider(ImageSlider $imageSlider): self{if ($this->imageSliders->removeElement($imageSlider)) {// set the owning side to null (unless already changed)if ($imageSlider->getProjet() === $this) {$imageSlider->setProjet(null);}}return $this;}public function isValidated(): ?bool{return $this->isValidated;}public function setIsValidated(bool $isValidated): self{$this->isValidated = $isValidated;return $this;}public function getCreatedAt(): ?\DateTimeImmutable{return $this->createdAt;}public function setCreatedAt(?\DateTimeImmutable $createdAt): self{$this->createdAt = $createdAt;return $this;}}