src/Entity/StudentLevel.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\StudentLevelRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=StudentLevelRepository::class)
  7.  */
  8. class StudentLevel
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="smallint")
  18.      */
  19.     private $value;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity=CalendarEvent::class)
  22.      */
  23.     private $calendarEvent;
  24.     /**
  25.      * @ORM\Column(type="string", length=255, nullable=true)
  26.      */
  27.     private $comment;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity=Student::class, inversedBy="levels")
  30.      */
  31.     private $student;
  32.     /**
  33.      * @ORM\ManyToOne(targetEntity=User::class)
  34.      * @ORM\JoinColumn(nullable=true)
  35.      */
  36.     private $author;
  37.     /**
  38.      * @ORM\Column(type="datetime")
  39.      */
  40.     private $createdAt;
  41.     public function __construct()
  42.     {
  43.         $this->createdAt = new \DateTime();
  44.     }
  45.     public function getId(): ?int
  46.     {
  47.         return $this->id;
  48.     }
  49.     public function getValue(): ?int
  50.     {
  51.         return $this->value;
  52.     }
  53.     public function setValue(int $value): self
  54.     {
  55.         $this->value $value;
  56.         return $this;
  57.     }
  58.     public function getCalendarEvent(): ?CalendarEvent
  59.     {
  60.         return $this->calendarEvent;
  61.     }
  62.     public function setCalendarEvent(?CalendarEvent $calendarEvent): self
  63.     {
  64.         $this->calendarEvent $calendarEvent;
  65.         return $this;
  66.     }
  67.     public function getComment(): ?string
  68.     {
  69.         return $this->comment;
  70.     }
  71.     public function setComment(?string $comment): self
  72.     {
  73.         $this->comment $comment;
  74.         return $this;
  75.     }
  76.     public function getStudent(): ?Student
  77.     {
  78.         return $this->student;
  79.     }
  80.     public function setStudent(?Student $student): self
  81.     {
  82.         $this->student $student;
  83.         return $this;
  84.     }
  85.     public function getAuthor(): ?User
  86.     {
  87.         return $this->author;
  88.     }
  89.     public function setAuthor(?User $author): self
  90.     {
  91.         $this->author $author;
  92.         return $this;
  93.     }
  94.     public function getCreatedAt(): ?\DateTimeInterface
  95.     {
  96.         return $this->createdAt;
  97.     }
  98.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  99.     {
  100.         $this->createdAt $createdAt;
  101.         return $this;
  102.     }
  103. }