<?php
namespace App\Entity\ChannelUserData\Cursus;
use App\Entity\Channel\Session;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
#[
ORM\Entity,
ORM\Table(name: 'channel_user_data_cursus_report_details'),
]
class ReportDetails
{
#[ORM\Id, ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private ?int $id = null;
#[ORM\ManyToOne(targetEntity: AbstractCursus::class, cascade: ['persist'], inversedBy: 'reportDetailsList')]
#[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')]
private ?AbstractCursus $cursus = null;
#[ORM\ManyToOne(targetEntity: Session::class)]
#[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')]
private ?Session $oldSession = null;
#[ORM\Column(type: 'date', nullable: true)]
private ?\DateTimeInterface $oldStartAt = null;
#[ORM\Column(type: 'date', nullable: true)]
private ?\DateTimeInterface $oldEndAt = null;
#[ORM\Column(type: 'text', length: 10000, nullable: false)]
#[
Assert\NotBlank,
Assert\Length(min: 5, max: 10000)
]
private ?string $details = null;
public function getId(): ?int
{
return $this->id;
}
public function getCursus(): ?AbstractCursus
{
return $this->cursus;
}
public function setCursus(?AbstractCursus $cursus): ReportDetails
{
$this->cursus = $cursus;
return $this;
}
public function getOldSession(): ?Session
{
return $this->oldSession;
}
public function setOldSession(?Session $oldSession): ReportDetails
{
$this->oldSession = $oldSession;
return $this;
}
public function getOldStartAt(): ?\DateTimeInterface
{
return $this->oldStartAt;
}
public function setOldStartAt(?\DateTimeInterface $oldStartAt): ReportDetails
{
$this->oldStartAt = $oldStartAt;
return $this;
}
public function getOldEndAt(): ?\DateTimeInterface
{
return $this->oldEndAt;
}
public function setOldEndAt(?\DateTimeInterface $oldEndAt): ReportDetails
{
$this->oldEndAt = $oldEndAt;
return $this;
}
public function getDetails(): ?string
{
return $this->details;
}
public function setDetails(?string $details): ReportDetails
{
$this->details = $details;
return $this;
}
}