<?php

declare(strict_types=1);

namespace App\Entity\Billing;

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

/**
 * Paramètres globaux d'une Organization concernant la facturation liée à la location.
 */
// #[Auditable]
#[ApiResource(operations: [])]
#[ORM\Entity]
class BillingSettingRent
{
    #[ORM\Id]
    #[ORM\Column]
    #[ORM\GeneratedValue]
    private ?int $id = null;

    #[ORM\OneToOne(targetEntity: BillingSetting::class, inversedBy: 'billingSettingRent', cascade: [])]
    protected ?BillingSetting $billingSetting;

    #[ORM\ManyToOne(targetEntity: FamilyQuotientModel::class, cascade: [], inversedBy: 'billingSettingRents')]
    #[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')]
    protected ?FamilyQuotientModel $familyQuotientModel;

    public function getBillingSetting(): ?BillingSetting
    {
        return $this->billingSetting;
    }

    public function setBillingSetting(?BillingSetting $billingSetting): self
    {
        $this->billingSetting = $billingSetting;

        return $this;
    }

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

    public function getFamilyQuotientModel(): ?FamilyQuotientModel
    {
        return $this->familyQuotientModel;
    }

    public function setFamilyQuotientModel(?FamilyQuotientModel $familyQuotientModel): self
    {
        $this->familyQuotientModel = $familyQuotientModel;

        return $this;
    }
}
