<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\DepartementRepository;
use Symfony\Component\Serializer\Annotation\Groups;
#[ORM\Entity(repositoryClass: DepartementRepository::class)]
class Departement
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $departmentNumber = null;
#[ORM\Column(length: 255)]
private ?string $departmentName = null;
public function getId(): ?int
{
return $this->id;
}
public function getDepartmentName(): ?string
{
return $this->departmentName;
}
public function setDepartmentName(string $departmentName): self
{
$this->departmentName = $departmentName;
return $this;
}
public function getDepartmentNumber(): ?string
{
return $this->departmentNumber;
}
public function setDepartmentNumber(string $departmentNumber): self
{
$this->departmentNumber = $departmentNumber;
return $this;
}
public function __toString()
{
return ucwords(str_replace('-', ' ', $this->departmentName)) . " - " . $this->departmentNumber;
}
}