<?php

namespace App\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity(repositoryClass="App\Repository\SuplovaniRepository")
 */
class Suplovani
{
    /**
     * @ORM\Id()
     * @ORM\GeneratedValue()
     * @ORM\Column(type="integer")
     */
    private $id;

    /**
     * @ORM\ManyToOne(targetEntity="App\Entity\Ucitele", inversedBy="suplovani")
     * @ORM\JoinColumn(nullable=false)
     */
    private $ucitel;

    /**
     * @ORM\OneToOne(targetEntity="App\Entity\Absence", cascade={"persist", "remove"})
     */
    private $absence;

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

    public function getUcitel(): ?Ucitele
    {
        return $this->ucitel;
    }

    public function setUcitel(?Ucitele $ucitel): self
    {
        $this->ucitel = $ucitel;

        return $this;
    }

    public function getAbsence(): ?Absence
    {
        return $this->absence;
    }

    public function setAbsence(?Absence $absence): self
    {
        $this->absence = $absence;

        return $this;
    }
}
