<?php
declare (strict_types=1);

namespace App\Entity\Organization;

use ApiPlatform\Metadata\GetCollection;
use ApiPlatform\Metadata\Post;
use ApiPlatform\Metadata\Delete;
use ApiPlatform\Metadata\Patch;
use ApiPlatform\Metadata\Put;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiFilter;
use App\Entity\Access\Access;
use App\Repository\Organization\OrganizationLicenceRepository;
//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
use Doctrine\ORM\Mapping as ORM;
#[ApiResource]
//#[Auditable]
#[ORM\Entity(repositoryClass: OrganizationLicenceRepository::class)]
class OrganizationLicence
{
    #[ORM\Id]
    #[ORM\Column]
    #[ORM\GeneratedValue]
    private ?int $id = null;
    #[ORM\ManyToOne(inversedBy: 'organizationLicences')]
    #[ORM\JoinColumn(nullable: false)]
    private Organization $organization;
    #[ORM\ManyToOne(inversedBy: 'organizationLicences')]
    #[ORM\JoinColumn(nullable: false)]
    private ?Access $licensee = null;
    #[ORM\Column(length: 255, nullable: true)]
    private ?string $licenceNumber = null;
    #[ORM\Column(length: 255, nullable: true)]
    private ?string $categorie = null;
    #[ORM\Column(type: 'date', nullable: true)]
    private ?\DateTimeInterface $validityDate = null;
    public function getId() : ?int
    {
        return $this->id;
    }
    public function getOrganization() : Organization
    {
        return $this->organization;
    }
    public function setOrganization(?Organization $organization) : self
    {
        $this->organization = $organization;
        return $this;
    }
    public function getLicensee() : ?Access
    {
        return $this->licensee;
    }
    public function setLicensee(?Access $licensee) : self
    {
        $this->licensee = $licensee;
        return $this;
    }
    public function getLicenceNumber() : ?string
    {
        return $this->licenceNumber;
    }
    public function setLicenceNumber(?string $licenceNumber) : self
    {
        $this->licenceNumber = $licenceNumber;
        return $this;
    }
    public function getCategorie() : ?string
    {
        return $this->categorie;
    }
    public function setCategorie(?string $categorie) : self
    {
        $this->categorie = $categorie;
        return $this;
    }
    public function getValidityDate() : ?\DateTimeInterface
    {
        return $this->validityDate;
    }
    public function setValidityDate(?\DateTimeInterface $validityDate) : self
    {
        $this->validityDate = $validityDate;
        return $this;
    }
}
