feat : ajout des sites pour les employés et retour arrière sur l'impression

This commit is contained in:
2026-02-04 18:00:46 +01:00
parent a5dcd5e3e9
commit 9568324a4a
16 changed files with 819 additions and 626 deletions

58
src/Entity/Site.php Normal file
View File

@@ -0,0 +1,58 @@
<?php
declare(strict_types=1);
namespace App\Entity;
use ApiPlatform\Metadata\ApiResource;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Attribute\Groups;
#[ApiResource(normalizationContext: ['groups' => ['site:read']])]
#[ORM\Entity]
#[ORM\Table(name: 'sites')]
class Site
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
#[Groups(['site:read', 'employee:read'])]
private ?int $id = null;
#[ORM\Column(type: 'string', length: 150)]
#[Groups(['site:read', 'employee:read'])]
private string $name = '';
#[ORM\Column(type: 'string', length: 20)]
#[Groups(['site:read', 'employee:read'])]
private string $color = '';
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 getColor(): string
{
return $this->color;
}
public function setColor(string $color): self
{
$this->color = $color;
return $this;
}
}