<?php

namespace App\ApiResources\OnlineRegistration;

use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use App\ApiResources\ApiResourcesInterface;
use App\State\Provider\OnlineRegistration\RegistrationStatusProvider;
use Symfony\Component\Serializer\Annotation\Groups;

#[ApiResource(
    operations: [
        new Get(
            uriTemplate: '/online_registration/status/{accessId}',
            requirements: ['accessId' => '\\d+'],
            defaults: ['accessId' => 0],
            provider: RegistrationStatusProvider::class
        )
    ]
)]
class RegistrationStatus implements ApiResourcesInterface
{
    #[ApiProperty(identifier: true)]
    private int $accessId;

    private ?string $status = null;

    public function getAccessId(): int
    {
        return $this->accessId;
    }

    public function setAccessId(int $accessId): void
    {
        $this->accessId = $accessId;
    }

    public function getStatus(): ?string
    {
        return $this->status;
    }

    public function setStatus(?string $status): void
    {
        $this->status = $status;
    }
}
