<?php
declare(strict_types=1);

namespace App\ApiResources\Utils;

use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use App\ApiResources\ApiResourcesInterface;

/**
 * Classe resource qui contient les champs de vérification d'un siret
 */

#[ApiResource(
    collectionOperations: [],
    itemOperations: [
        'get' => [
            'method' => 'GET',
            'path' => '/siret-checking/{number}'
        ]
    ]
)]
class Siret implements ApiResourcesInterface
{
    #[ApiProperty(identifier: true)]
    private ?string $number = null;

    private bool $isCorrect = false;

    public function __construct()
    {
    }
    public function getNumber(): ?string
    {
        return $this->number;
    }

    public function setNumber(?string $number): self
    {
        $this->number = $number;
        return $this;
    }

    public function setIsCorrect(bool $isCorrect): self
    {
        $this->isCorrect = $isCorrect;
        return $this;
    }

    public function getIsCorrect(): bool
    {
        return $this->isCorrect;
    }
}