src/Entity/Organisation/University/University.php line 11
<?php
namespace App\Entity\Organisation\University;
use App\Entity\Organisation\Organisation;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'universities')]
#[ORM\Entity(repositoryClass: 'App\Repository\Organisation\University\UniversityRepository')]
class University
{
/**
* @var ?int
*/
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
#[ORM\Column(type: 'integer')]
private $id;
/**
* @var ArrayCollection|Category[]
*/
#[ORM\JoinTable(name: 'university_category_relation')]
#[ORM\ManyToMany(targetEntity: 'App\Entity\Organisation\University\Category', inversedBy: 'organisations')]
private $universityCategories;
#[ORM\Column(type: 'boolean', options: ['default' => false])]
private $haveDorm = false;
#[ORM\Column(type: 'boolean', options: ['default' => false])]
private $haveMilitaryDepartment = false;
/**
* @var
*/
#[ORM\OneToMany(targetEntity: 'App\Entity\Organisation\University\Specialty', mappedBy: 'university')]
private $specialties;
/**
* @var Organisation
*/
#[ORM\OneToOne(targetEntity: 'App\Entity\Organisation\Organisation')]
private $organisation;
public function __construct()
{
$this->universityCategories = new ArrayCollection();
}
/**
* @return Category[]|ArrayCollection
*/
public function getUniversityCategories()
{
return $this->universityCategories;
}
/**
* @param Category[]|ArrayCollection $universityCategories
*/
public function setUniversityCategories($universityCategories): void
{
$this->universityCategories = $universityCategories;
}
/**
* @return bool
*/
public function isHaveDorm(): bool
{
return $this->haveDorm;
}
/**
* @param bool $haveDorm
*/
public function setHaveDorm(bool $haveDorm): void
{
$this->haveDorm = $haveDorm;
}
/**
* @return bool
*/
public function isHaveMilitaryDepartment(): bool
{
return $this->haveMilitaryDepartment;
}
/**
* @param bool $haveMilitaryDepartment
*/
public function setHaveMilitaryDepartment(bool $haveMilitaryDepartment): void
{
$this->haveMilitaryDepartment = $haveMilitaryDepartment;
}
/**
* @return int|null
*/
public function getId(): ?int
{
return $this->id;
}
/**
* @param int|null $id
*/
public function setId(?int $id): void
{
$this->id = $id;
}
/**
* @return Organisation
*/
public function getOrganisation(): Organisation
{
return $this->organisation;
}
/**
* @param Organisation $organisation
*/
public function setOrganisation(Organisation $organisation): void
{
$this->organisation = $organisation;
}
/**
* @return mixed
*/
public function getSpecialties()
{
return $this->specialties;
}
/**
* @param mixed $specialties
*/
public function setSpecialties($specialties): void
{
$this->specialties = $specialties;
}
}