<?php

declare(strict_types=1);

namespace App\Entity\Billing;

use Doctrine\ORM\Mapping as ORM;

/**
 * Fais le lien entre l'Access qui règle la facture et l'Access ou
 * l'EducationalProject concerné par la facture
 * Classe de base de @see  AccessPayer, EducationalProjectPayer.
 */
#[ORM\Entity]
#[ORM\Table(name: 'BillingPayer')]
#[ORM\InheritanceType('SINGLE_TABLE')]
#[ORM\DiscriminatorColumn(name: 'discr', type: 'string')]
#[ORM\DiscriminatorMap(
    [
        'access' => AccessPayer::class,
        'educationalproject' => EducationalProjectPayer::class,
    ]
)]
abstract class AbstractBillingPayer
{
    #[ORM\Id]
    #[ORM\Column]
    #[ORM\GeneratedValue]
    protected ?int $id = null;

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