src/Entity/ChannelUserData/Cursus/ReportDetails.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity\ChannelUserData\Cursus;
  3. use App\Entity\Channel\Session;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. #[
  7. ORM\Entity,
  8. ORM\Table(name: 'channel_user_data_cursus_report_details'),
  9. ]
  10. class ReportDetails
  11. {
  12. #[ORM\Id, ORM\GeneratedValue]
  13. #[ORM\Column(type: 'integer')]
  14. private ?int $id = null;
  15. #[ORM\ManyToOne(targetEntity: AbstractCursus::class, cascade: ['persist'], inversedBy: 'reportDetailsList')]
  16. #[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')]
  17. private ?AbstractCursus $cursus = null;
  18. #[ORM\ManyToOne(targetEntity: Session::class)]
  19. #[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')]
  20. private ?Session $oldSession = null;
  21. #[ORM\Column(type: 'date', nullable: true)]
  22. private ?\DateTimeInterface $oldStartAt = null;
  23. #[ORM\Column(type: 'date', nullable: true)]
  24. private ?\DateTimeInterface $oldEndAt = null;
  25. #[ORM\Column(type: 'text', length: 10000, nullable: false)]
  26. #[
  27. Assert\NotBlank,
  28. Assert\Length(min: 5, max: 10000)
  29. ]
  30. private ?string $details = null;
  31. public function getId(): ?int
  32. {
  33. return $this->id;
  34. }
  35. public function getCursus(): ?AbstractCursus
  36. {
  37. return $this->cursus;
  38. }
  39. public function setCursus(?AbstractCursus $cursus): ReportDetails
  40. {
  41. $this->cursus = $cursus;
  42. return $this;
  43. }
  44. public function getOldSession(): ?Session
  45. {
  46. return $this->oldSession;
  47. }
  48. public function setOldSession(?Session $oldSession): ReportDetails
  49. {
  50. $this->oldSession = $oldSession;
  51. return $this;
  52. }
  53. public function getOldStartAt(): ?\DateTimeInterface
  54. {
  55. return $this->oldStartAt;
  56. }
  57. public function setOldStartAt(?\DateTimeInterface $oldStartAt): ReportDetails
  58. {
  59. $this->oldStartAt = $oldStartAt;
  60. return $this;
  61. }
  62. public function getOldEndAt(): ?\DateTimeInterface
  63. {
  64. return $this->oldEndAt;
  65. }
  66. public function setOldEndAt(?\DateTimeInterface $oldEndAt): ReportDetails
  67. {
  68. $this->oldEndAt = $oldEndAt;
  69. return $this;
  70. }
  71. public function getDetails(): ?string
  72. {
  73. return $this->details;
  74. }
  75. public function setDetails(?string $details): ReportDetails
  76. {
  77. $this->details = $details;
  78. return $this;
  79. }
  80. }