<?php

namespace App\Entity;

use App\Repository\InterventionAnomalieRepository;
use App\Repository\InterventionAnomalieOracleRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;

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

    /**
     * @ORM\Id
     * @ORM\ManyToOne(targetEntity=Intervention::class, inversedBy="interventionAnomalies")
     * @ORM\JoinColumn(name="idintervention")
     */
    private $intervention;

    /**
     * @ORM\Id
     * @ORM\ManyToOne(targetEntity=Anomalie::class, inversedBy="interventionAnomalies")
     * @ORM\JoinColumn(name="idanomalie")
     * @Groups({"api"})
     */
    private $anomalie;

    /**
     * @ORM\Id
     * @ORM\ManyToOne(targetEntity=AnomalieOracle::class, inversedBy="interventionAnomaliesOracle")
     * @ORM\JoinColumn(name="idanomalie_oracle")
     * @Groups({"api"})
     */
    private $anomalie_oracle;

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

    public function getIntervention(): ?Intervention
    {
        return $this->intervention;
    }

    public function setIntervention(?Intervention $intervention): self
    {
        $this->intervention = $intervention;

        return $this;
    }

    public function getAnomalie(): ?Anomalie
    {
        return $this->anomalie;
    }

    public function setAnomalie(?Anomalie $anomalie): self
    {
        $this->anomalie = $anomalie;

        return $this;
    }

    public function getAnomalieOracle(): ?AnomalieOracle
    {
        return $this->anomalie_oracle;
    }

    public function setAnomalieOracle(?AnomalieOracle $anomalie_oracle): self
    {
        $this->anomalie_oracle = $anomalie_oracle;

        return $this;
    }
}
