src/Entity/AgendaTimeConvertion.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AgendaTimeConvertionRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassAgendaTimeConvertionRepository::class)]
  6. #[ORM\Table(name"agenda_time_convertion"uniqueConstraints: [
  7.     new ORM\UniqueConstraint(name"uniq_school_year"columns: ["school_id""year_id"])
  8. ])]
  9. class AgendaTimeConvertion
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column]
  16.     private ?float $time null;
  17.     #[ORM\ManyToOne(inversedBy'agendaTimeConvertions')]
  18.     #[ORM\JoinColumn(nullablefalse)]
  19.     private ?School $school null;
  20.     #[ORM\ManyToOne(inversedBy'agendaTimeConvertions')]
  21.     #[ORM\JoinColumn(nullablefalse)]
  22.     private ?SchoolYear $year null;
  23.     #[ORM\ManyToOne(inversedBy'agendaTimeConvertions')]
  24.     #[ORM\JoinColumn(nullablefalse)]
  25.     private ?User $author null;
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function getTime(): ?float
  31.     {
  32.         return $this->time;
  33.     }
  34.     public function setTime(float $time): static
  35.     {
  36.         $this->time $time;
  37.         return $this;
  38.     }
  39.     public function getSchool(): ?School
  40.     {
  41.         return $this->school;
  42.     }
  43.     public function setSchool(?School $school): static
  44.     {
  45.         $this->school $school;
  46.         return $this;
  47.     }
  48.     public function getYear(): ?SchoolYear
  49.     {
  50.         return $this->year;
  51.     }
  52.     public function setYear(?SchoolYear $year): static
  53.     {
  54.         $this->year $year;
  55.         return $this;
  56.     }
  57.     public function getAuthor(): ?User
  58.     {
  59.         return $this->author;
  60.     }
  61.     public function setAuthor(?User $author): static
  62.     {
  63.         $this->author $author;
  64.         return $this;
  65.     }
  66. }