<?php

namespace App\Entity;

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

#[ORM\Entity(repositoryClass: InternFavoriteRepository::class)]
class InternFavorite
{
    #[ORM\Id]
    #[ORM\GeneratedValue]
    #[ORM\Column]
    private ?int $id = null;

    #[ORM\ManyToOne(inversedBy: 'favoritesInterns')]
    private ?Announcement $announcement = null;

    #[ORM\ManyToOne(inversedBy: 'favorites')]
    private ?Intern $intern = null;

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

    public function getAnnouncement(): ?Announcement
    {
        return $this->announcement;
    }

    public function setAnnouncement(?Announcement $announcement): static
    {
        $this->announcement = $announcement;

        return $this;
    }

    public function getIntern(): ?Intern
    {
        return $this->intern;
    }

    public function setIntern(?Intern $intern): static
    {
        $this->intern = $intern;

        return $this;
    }
}
