<?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;

/**
 * Ville.
 * Enum des villes existantes (en France, Suisse, Luxembourg, Belgique).
 */
// #[Auditable]
#[ApiResource(operations: [])]
#[ORM\Entity]
class City
{
    #[ORM\Id]
    #[ORM\Column(type: 'mediumint', options: ['unsigned' => true])]
    #[ORM\GeneratedValue]
    private ?int $id = null;

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

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

    public function getDepartment(): Department
    {
        return $this->department;
    }

    public function setDepartment(Department $department): self
    {
        $this->department = $department;

        return $this;
    }
}
