Files
cabinet/src/Entity/Department.php
T
2026-05-28 12:09:28 +03:00

160 lines
2.7 KiB
PHP

<?php
namespace App\Entity;
use App\Repository\DepartmentRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=DepartmentRepository::class)
*/
class Department
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="integer")
*/
private $did;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="string", length=255)
*/
private $groupName;
/**
* @ORM\Column(type="boolean")
*/
private $onlineMode;
/**
* @ORM\Column(type="string", length=255)
*/
private $alias;
/**
* @ORM\Column(type="boolean", options={"default" : true})
*/
private $active;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $middleName;
public function getId(): ?int
{
return $this->id;
}
public function getDid(): ?int
{
return $this->did;
}
public function setDid(string $did): self
{
$this->did = $did;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getGroupName(): ?string
{
return $this->groupName;
}
public function setGroupName(string $groupName): self
{
$this->groupName = $groupName;
return $this;
}
public function getOnlineMode(): ?bool
{
return $this->onlineMode;
}
public function setOnlineMode(bool $onlineMode): self
{
$this->onlineMode = $onlineMode;
return $this;
}
public function getAlias(): ?string
{
return $this->alias;
}
public function setAlias(string $alias): self
{
$this->alias = $alias;
return $this;
}
public function getActive(): ?bool
{
return $this->active;
}
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
public function getMiddleName(): ?string
{
return $this->middleName;
}
public function setMiddleName(?string $middleName): self
{
$this->middleName = $middleName;
return $this;
}
public function isOnlineMode(): ?bool
{
return $this->onlineMode;
}
public function isActive(): ?bool
{
return $this->active;
}
public function toArray() {
return get_object_vars($this);
}
}