<?phpnamespace App\Entity;use App\Repository\VideoElearningRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: VideoElearningRepository::class)]class VideoElearning{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255, nullable: true)] private ?string $titre = null; #[ORM\ManyToOne(inversedBy: 'videoElearnings')] private ?FormationElearning $formation = null; #[ORM\Column(length: 255, nullable: true)] private ?string $nbminute = null; #[ORM\Column(length: 255, nullable: true)] private ?string $idvideo = null; #[ORM\Column(length: 255, nullable: true)] private ?string $embed = null; #[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)] private ?\DateTimeInterface $date = null; #[ORM\OneToMany(mappedBy: 'video', targetEntity: CommentElearning::class)] private Collection $commentElearnings; public function __construct() { $this->commentElearnings = 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 getFormation(): ?FormationElearning { return $this->formation; } public function setFormation(?FormationElearning $formation): self { $this->formation = $formation; return $this; } public function getNbminute(): ?string { return $this->nbminute; } public function setNbminute(?string $nbminute): self { $this->nbminute = $nbminute; return $this; } public function getIdvideo(): ?string { return $this->idvideo; } public function setIdvideo(?string $idvideo): self { $this->idvideo = $idvideo; return $this; } public function getEmbed(): ?string { return $this->embed; } public function setEmbed(?string $embed): self { $this->embed = $embed; return $this; } public function getDate(): ?\DateTimeInterface { return $this->date; } public function setDate(?\DateTimeInterface $date): self { $this->date = $date; return $this; } /** * @return Collection<int, CommentElearning> */ public function getCommentElearnings(): Collection { return $this->commentElearnings; } public function addCommentElearning(CommentElearning $commentElearning): self { if (!$this->commentElearnings->contains($commentElearning)) { $this->commentElearnings->add($commentElearning); $commentElearning->setVideo($this); } return $this; } public function removeCommentElearning(CommentElearning $commentElearning): self { if ($this->commentElearnings->removeElement($commentElearning)) { // set the owning side to null (unless already changed) if ($commentElearning->getVideo() === $this) { $commentElearning->setVideo(null); } } return $this; }}