<?php

namespace App\Entity\Properties;

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

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

    /**
     * @ORM\Column(type="string", length=100)
     */
    private string $type;

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

    /**
     * @ORM\Column(type="date")
     */
    private DateTimeInterface $date_intervention;

    /**
     * @ORM\Column(type="text", nullable=true)
     */
    private ?string $description = null;

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

    // Getters / Setters
    public function getType(): string
    {
        return $this->type;
    }
    public function setType(string $type): self
    {
        $this->type = $type;
        return $this;
    }

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

    public function getDateIntervention(): DateTimeInterface
    {
        return $this->date_intervention;
    }
    public function setDateIntervention(DateTimeInterface $date): self
    {
        $this->date_intervention = $date;
        return $this;
    }

    public function getDescription(): ?string
    {
        return $this->description;
    }
    public function setDescription(?string $desc): self
    {
        $this->description = $desc;
        return $this;
    }

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