<?php

namespace App\Entity;

use App\Repository\ClientAdresseRepository;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity(repositoryClass=ClientAdresseRepository::class)
 * @ORM\Table(schema="sav")
 */
class ClientAdresse
{

    /**
     * @ORM\Id
     * @ORM\ManyToOne(targetEntity=Client::class, inversedBy="clientAdresses", cascade={"persist"})
     * @ORM\JoinColumn(nullable=false, name="idclient")
     */
    private $client;

    /**
     * @ORM\Id
     * @ORM\ManyToOne(targetEntity=Adresse::class, inversedBy="clientAdresses",  cascade={"persist"})
     * @ORM\JoinColumn(nullable=false, name="idadresse")
     */
    private $adresse;

    /**
     * @ORM\Column(type="boolean", nullable=true)
     */
    private $actif = true;

    /**
     * @ORM\Column(type="text", nullable=true)
     */
    private $commentaire_tech;

    public function getClient(): ?Client
    {
        return $this->client;
    }

    public function setClient(?Client $client): self
    {
        $this->client = $client;

        return $this;
    }

    public function getAdresse(): ?Adresse
    {
        return $this->adresse;
    }

    public function setAdresse(?Adresse $adresse): self
    {
        $this->adresse = $adresse;

        return $this;
    }

    public function getActif(): ?bool
    {
        return $this->actif;
    }

    public function setActif(?bool $actif): self
    {
        $this->actif = $actif;

        return $this;
    }

    public function getCommentaireTech(): ?string
    {
        return $this->commentaire_tech;
    }

    public function setCommentaireTech(?string $commentaire_tech): self
    {
        $this->commentaire_tech = $commentaire_tech;

        return $this;
    }
}
