[#322] Page horaire (#4)
All checks were successful
Auto Tag Develop / tag (push) Successful in 5s

| Numéro du ticket | Titre du ticket |
|------------------|-----------------|
|        #322          |        Page horaire         |

## Description de la PR
[#322] Page horaire

## Modification du .env

## Check list

- [ ] Pas de régression
- [ ] TU/TI/TF rédigée
- [ ] TU/TI/TF OK
- [ ] CHANGELOG modifié

Reviewed-on: #4
Co-authored-by: tristan <tristan@yuno.malio.fr>
Co-committed-by: tristan <tristan@yuno.malio.fr>
This commit was merged in pull request #4.
This commit is contained in:
2026-02-20 11:23:52 +00:00
committed by Autin
parent f6c1f7eead
commit ee16779777
85 changed files with 6232 additions and 242 deletions

View File

@@ -4,7 +4,9 @@ declare(strict_types=1);
namespace App\Entity;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use App\Repository\EmployeeRepository;
use DateTimeImmutable;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Attribute\Groups;
@@ -15,7 +17,7 @@ use Symfony\Component\Serializer\Attribute\Groups;
paginationEnabled: false,
security: "is_granted('ROLE_ADMIN')"
)]
#[ORM\Entity]
#[ORM\Entity(repositoryClass: EmployeeRepository::class)]
#[ORM\Table(name: 'employees')]
class Employee
{
@@ -33,12 +35,18 @@ class Employee
#[Groups(['absence:read', 'employee:read', 'employee:write'])]
private string $lastName = '';
#[ApiPlatform\Metadata\ApiProperty(readableLink: true)]
#[ApiProperty(readableLink: true)]
#[ORM\ManyToOne(targetEntity: Site::class)]
#[ORM\JoinColumn(nullable: true)]
#[Groups(['employee:read', 'employee:write'])]
private ?Site $site = null;
#[ApiProperty(readableLink: true)]
#[ORM\ManyToOne(targetEntity: Contract::class)]
#[ORM\JoinColumn(nullable: false)]
#[Groups(['employee:read', 'employee:write'])]
private ?Contract $contract = null;
#[ORM\Column(type: 'integer', options: ['default' => 0])]
#[Groups(['employee:read', 'employee:write'])]
private int $displayOrder = 0;
@@ -92,6 +100,18 @@ class Employee
return $this;
}
public function getContract(): ?Contract
{
return $this->contract;
}
public function setContract(?Contract $contract): self
{
$this->contract = $contract;
return $this;
}
public function getCreatedAt(): DateTimeImmutable
{
return $this->createdAt;