<?php

declare(strict_types=1);

namespace App\Entity\Core;

// use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
use ApiPlatform\Metadata\ApiResource;
use Doctrine\ORM\Mapping as ORM;

/**
 * Département.
 */
// #[Auditable]
#[ApiResource(operations: [])]
#[ORM\Entity]
class Department
{
    #[ORM\Id]
    #[ORM\Column]
    #[ORM\GeneratedValue]
    private ?int $id = null;

    #[ORM\ManyToOne(targetEntity: Region::class, cascade: [])]
    #[ORM\JoinColumn(nullable: false)]
    protected Region $region;

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

    public function getRegion(): Region
    {
        return $this->region;
    }

    public function setRegion(Region $region): self
    {
        $this->region = $region;

        return $this;
    }
}
