<?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Repository\DemmandeformationRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: DemmandeformationRepository::class)]
#[ApiResource]
class Demmandeformation
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $titre = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $description = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $date = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $duree = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $nbcandidats = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $budget = null;
#[ORM\ManyToOne(inversedBy: 'demmandeformations')]
private ?User $user = null;
#[ORM\Column(nullable: true)]
private ?bool $statut = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $reponse = null;
#[ORM\OneToMany(mappedBy: 'demande', targetEntity: ReponseDemandeFormation::class,cascade: ['remove'])]
private Collection $reponseDemandeFormations;
#[ORM\Column(nullable: true)]
private ?bool $vuadmin = null;
#[ORM\Column(nullable: true)]
private ?bool $vupartner = null;
public function __construct()
{
$this->reponseDemandeFormations = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getTitre(): ?string
{
return $this->titre;
}
public function setTitre(?string $titre): self
{
$this->titre = $titre;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function getDuree(): ?string
{
return $this->duree;
}
public function setDuree(?string $duree): self
{
$this->duree = $duree;
return $this;
}
public function getNbcandidats(): ?string
{
return $this->nbcandidats;
}
public function setNbcandidats(?string $nbcandidats): self
{
$this->nbcandidats = $nbcandidats;
return $this;
}
public function getBudget(): ?string
{
return $this->budget;
}
public function setBudget(?string $budget): self
{
$this->budget = $budget;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function isStatut(): ?bool
{
return $this->statut;
}
public function setStatut(?bool $statut): self
{
$this->statut = $statut;
return $this;
}
public function getReponse(): ?string
{
return $this->reponse;
}
public function setReponse(?string $reponse): self
{
$this->reponse = $reponse;
return $this;
}
/**
* @return Collection<int, ReponseDemandeFormation>
*/
public function getReponseDemandeFormations(): Collection
{
return $this->reponseDemandeFormations;
}
public function addReponseDemandeFormation(ReponseDemandeFormation $reponseDemandeFormation): self
{
if (!$this->reponseDemandeFormations->contains($reponseDemandeFormation)) {
$this->reponseDemandeFormations->add($reponseDemandeFormation);
$reponseDemandeFormation->setDemande($this);
}
return $this;
}
public function removeReponseDemandeFormation(ReponseDemandeFormation $reponseDemandeFormation): self
{
if ($this->reponseDemandeFormations->removeElement($reponseDemandeFormation)) {
// set the owning side to null (unless already changed)
if ($reponseDemandeFormation->getDemande() === $this) {
$reponseDemandeFormation->setDemande(null);
}
}
return $this;
}
public function isVuadmin(): ?bool
{
return $this->vuadmin;
}
public function setVuadmin(?bool $vuadmin): self
{
$this->vuadmin = $vuadmin;
return $this;
}
public function isVupartner(): ?bool
{
return $this->vupartner;
}
public function setVupartner(?bool $vupartner): self
{
$this->vupartner = $vupartner;
return $this;
}
}