<?php

declare(strict_types=1);

namespace App\Entity\Organization;

use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use App\Repository\Organization\OrganizationIdentificationRepository;
use Doctrine\ORM\Mapping as ORM;

/**
 * Cette entité regroupe les informations permettant d'identifier une organisation, et est utilisée entre autre
 * pour la création d'organisation.
 *
 * Fichier source de la view : ./sql/schema-extensions/003-view_organization_identification.sql
 */
#[ApiResource(
    operations: [
        new Get(
            uriTemplate: '/public/organization_identification/{id}',
            requirements: ['id' => '\\d+']
        ),
    ]
)]
#[ORM\Table(name: 'view_organization_identification')]
#[ORM\Entity(repositoryClass: OrganizationIdentificationRepository::class, readOnly: true)]
class OrganizationIdentification
{
    #[ORM\Id]
    #[ORM\Column]
    private int $id;

    #[ORM\Column]
    private string $name;

    #[ORM\Column]
    private string $normalizedName;

    #[ORM\Column(nullable: true, options: ['default' => null])]
    private ?string $identifier = null;

    #[ORM\Column(nullable: true, options: ['default' => null])]
    private ?string $siretNumber = null;

    #[ORM\Column(nullable: true, options: ['default' => null])]
    private ?string $waldecNumber = null;

    #[ORM\Column(nullable: true, options: ['default' => null])]
    private ?string $normalizedAddress = null;

    #[ORM\Column(nullable: true, options: ['default' => null])]
    private ?string $streetAddress = null;

    #[ORM\Column(nullable: true, options: ['default' => null])]
    private ?string $streetAddressSecond = null;

    #[ORM\Column(nullable: true, options: ['default' => null])]
    private ?string $streetAddressThird = null;

    #[ORM\Column(nullable: true, options: ['default' => null])]
    private ?string $addressCity = null;

    #[ORM\Column(nullable: true, options: ['default' => null])]
    private ?string $postalCode = null;

    #[ORM\Column(nullable: true, options: ['default' => null])]
    private ?string $email = null;

    #[ORM\Column(nullable: true, options: ['default' => null])]
    private ?string $telphone = null;

    public function getId(): int
    {
        return $this->id;
    }

    public function setId(int $id): self
    {
        $this->id = $id;

        return $this;
    }

    public function getName(): string
    {
        return $this->name;
    }

    public function setName(string $name): self
    {
        $this->name = $name;

        return $this;
    }

    public function getNormalizedName(): string
    {
        return $this->normalizedName;
    }

    public function setNormalizedName(string $normalizedName): self
    {
        $this->normalizedName = $normalizedName;

        return $this;
    }

    public function getIdentifier(): ?string
    {
        return $this->identifier;
    }

    public function setIdentifier(?string $identifier): self
    {
        $this->identifier = $identifier;

        return $this;
    }

    public function getSiretNumber(): ?string
    {
        return $this->siretNumber;
    }

    public function setSiretNumber(?string $siretNumber): self
    {
        $this->siretNumber = $siretNumber;

        return $this;
    }

    public function getWaldecNumber(): ?string
    {
        return $this->waldecNumber;
    }

    public function setWaldecNumber(?string $waldecNumber): self
    {
        $this->waldecNumber = $waldecNumber;

        return $this;
    }

    public function getNormalizedAddress(): ?string
    {
        return $this->normalizedAddress;
    }

    public function setNormalizedAddress(?string $normalizedAddress): self
    {
        $this->normalizedAddress = $normalizedAddress;

        return $this;
    }

    public function getAddressCity(): ?string
    {
        return $this->addressCity;
    }

    public function setAddressCity(?string $addressCity): self
    {
        $this->addressCity = $addressCity;

        return $this;
    }

    public function getPostalCode(): ?string
    {
        return $this->postalCode;
    }

    public function setPostalCode(?string $postalCode): self
    {
        $this->postalCode = $postalCode;

        return $this;
    }

    public function getEmail(): ?string
    {
        return $this->email;
    }

    public function setEmail(?string $email): self
    {
        $this->email = $email;

        return $this;
    }

    public function getTelphone(): ?string
    {
        return $this->telphone;
    }

    public function setTelphone(?string $telphone): self
    {
        $this->telphone = $telphone;

        return $this;
    }
}
