<?php

namespace App\Entity\Properties;

use DateTimeInterface;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\Common\DeletedTrait;

/**
 * @ORM\Entity
 */
class Commission
{
    use \App\Entity\Common\IdTrait;
    use \App\Entity\Common\DatesTrait;

    use DeletedTrait;

    /**
     * @ORM\Column(type="decimal", precision=5, scale=2)
     */
    private float $pourcentage;

    /**
     * @ORM\Column(type="decimal", precision=10, scale=2)
     */
    private float $montant;

    /**
     * @ORM\ManyToOne(targetEntity=Properties::class, inversedBy="commissions")
     */
    private ?Properties $properties = null;

    // Optionnel : lien direct avec le bailleur/démarcheur si besoin
    // private ?Proprietaires $bailleur;
    // private ?Demarcheurs $demarcheur;

    // Getters / Setters
    public function getPourcentage(): float
    {
        return $this->pourcentage;
    }
    public function setPourcentage(float $pourcentage): self
    {
        $this->pourcentage = $pourcentage;
        return $this;
    }

    public function getMontant(): float
    {
        return $this->montant;
    }
    public function setMontant(float $montant): self
    {
        $this->montant = $montant;
        return $this;
    }

    public function getProperties(): ?Properties
    {
        return $this->properties;
    }
    public function setProperties(?Properties $properties): self
    {
        $this->properties = $properties;
        return $this;
    }
}
