<?php
namespace App\Entity;
use App\Repository\CoursesRepository;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ORM\Entity(repositoryClass=CoursesRepository::class)
*/
class Courses {
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $name;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $description;
/**
* @ORM\Column(type="string", length=10, nullable=true)
*/
private $abreviature;
/**
* @ORM\OneToMany(targetEntity="StudentCourse", mappedBy="course")
*/
protected $students;
public function __construct() {
$this->students = new ArrayCollection();
}
public function getId(): ?int {
return $this->id;
}
public function getName(): ?string {
return $this->name;
}
public function setName(?string $name): self {
$this->name = $name;
return $this;
}
public function getDescription(): ?string {
return $this->description;
}
public function setDescription(?string $description): self {
$this->description = $description;
return $this;
}
public function getAbreviature() {
return $this->abreviature;
}
public function setAbreviature($abreviature): void {
$this->abreviature = $abreviature;
}
public function __toString() {
return $this->getName();
}
public function getStudentCourses() {
return $this->students;
}
public function setStudentCourses($studentCourses): void {
$this->students = $studentCourses;
}
}