<?php
namespace App\Entity;
use App\Repository\CartItemLessonRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: CartItemLessonRepository::class)]
class CartItemLesson extends CartItem
{
#[ORM\ManyToOne(targetEntity: Lesson::class, inversedBy: 'cartItemLessons')]
private $lesson;
public function getName(): ?string
{
return parent::getName() ?? 'Cotisation';
}
public function getLesson(): ?Lesson
{
return $this->lesson;
}
public function setLesson(?Lesson $lesson): self
{
$this->lesson = $lesson;
return $this;
}
}