src/Entity/SubPeriod.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SubPeriodRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClass: SubPeriodRepository::class)]
  6. class SubPeriod
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column(type: 'integer')]
  11.     private ?int $id = null;
  12.     #[ORM\ManyToOne(targetEntity: Period::class, inversedBy: 'subPeriods')]
  13.     #[ORM\JoinColumn(nullable: false)]
  14.     private ?Period $period;
  15.     #[ORM\Column(type: 'date')]
  16.     private ?\DateTimeInterface $start_date = null;
  17.     #[ORM\Column(type: 'date')]
  18.     private ?\DateTime $end_date = null;
  19.     #[ORM\Column(type: 'float')]
  20.     private ?float $pointsPerExam = null;
  21.     public function getId(): ?int
  22.     {
  23.         return $this->id;
  24.     }
  25.     public function getPeriod(): ?Period
  26.     {
  27.         return $this->period;
  28.     }
  29.     public function setPeriod(?Period $period): self
  30.     {
  31.         $this->period = $period;
  32.         return $this;
  33.     }
  34.     public function getStartDate(): ?\DateTimeInterface
  35.     {
  36.         return $this->start_date;
  37.     }
  38.     public function setStartDate(\DateTimeInterface $start_date): self
  39.     {
  40.         $this->start_date = $start_date;
  41.         return $this;
  42.     }
  43.     public function getEndDate(): ?\DateTime
  44.     {
  45.         return $this->end_date;
  46.     }
  47.     public function setEndDate(\DateTime $end_date): self
  48.     {
  49.         $this->end_date = $end_date;
  50.         return $this;
  51.     }
  52.     public function getPointsPerExam(): ?float
  53.     {
  54.         return $this->pointsPerExam;
  55.     }
  56.     public function setPointsPerExam(float $pointsPerExam): self
  57.     {
  58.         $this->pointsPerExam = $pointsPerExam;
  59.         return $this;
  60.     }
  61. }