<?php
namespace App\Entity;
use App\Repository\AgendaTimeConvertionRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: AgendaTimeConvertionRepository::class)]
#[ORM\Table(name: "agenda_time_convertion", uniqueConstraints: [
new ORM\UniqueConstraint(name: "uniq_school_year", columns: ["school_id", "year_id"])
])]
class AgendaTimeConvertion
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column]
private ?float $time = null;
#[ORM\ManyToOne(inversedBy: 'agendaTimeConvertions')]
#[ORM\JoinColumn(nullable: false)]
private ?School $school = null;
#[ORM\ManyToOne(inversedBy: 'agendaTimeConvertions')]
#[ORM\JoinColumn(nullable: false)]
private ?SchoolYear $year = null;
#[ORM\ManyToOne(inversedBy: 'agendaTimeConvertions')]
#[ORM\JoinColumn(nullable: false)]
private ?User $author = null;
public function getId(): ?int
{
return $this->id;
}
public function getTime(): ?float
{
return $this->time;
}
public function setTime(float $time): static
{
$this->time = $time;
return $this;
}
public function getSchool(): ?School
{
return $this->school;
}
public function setSchool(?School $school): static
{
$this->school = $school;
return $this;
}
public function getYear(): ?SchoolYear
{
return $this->year;
}
public function setYear(?SchoolYear $year): static
{
$this->year = $year;
return $this;
}
public function getAuthor(): ?User
{
return $this->author;
}
public function setAuthor(?User $author): static
{
$this->author = $author;
return $this;
}
}