<?php

namespace App\Entity;

use App\Repository\InternDegreeRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;

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

    #[ORM\ManyToOne(inversedBy: 'interns')]
    private ?Degree $degree = null;

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

    #[ORM\Column(type: Types::DATE_MUTABLE)]
    private ?\DateTimeInterface $graduationDate = null;

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

    public function getDegree(): ?Degree
    {
        return $this->degree;
    }

    public function setDegree(?Degree $degree): static
    {
        $this->degree = $degree;

        return $this;
    }

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

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

        return $this;
    }

    public function getGraduationDate(): ?\DateTimeInterface
    {
        return $this->graduationDate;
    }

    public function setGraduationDate(\DateTimeInterface $graduationDate): static
    {
        $this->graduationDate = $graduationDate;

        return $this;
    }
}
