<?phpnamespace App\Entity;use App\Entity\Traits\Timestampable;use App\Repository\PunishRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use JMS\Serializer\Annotation\Groups;#[ORM\HasLifecycleCallbacks]#[ORM\Entity(repositoryClass: PunishRepository::class)]class Punish{ use Timestampable; #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] #[Groups(['getPunish'])] private ?int $id = null; #[ORM\ManyToOne(inversedBy: 'punishes', cascade: ["persist"])] #[ORM\JoinColumn(nullable: false)] private ?User $author = null; #[ORM\ManyToOne(inversedBy: 'punishDetails', cascade: ["persist"])] #[ORM\JoinColumn(nullable: false)] #[Groups(['getPunish'])] private ?Student $student = null; #[ORM\Column(type: Types::TEXT, nullable: true)] #[Groups(['getPunish'])] private ?string $punishDetails = null; #[ORM\ManyToOne(inversedBy: 'punishes', cascade: ["persist"])] #[ORM\JoinColumn(nullable: false)] private ?SchoolYear $year = null; #[ORM\ManyToOne(inversedBy: 'punish', cascade: ["persist"])] #[ORM\JoinColumn(nullable: false)] #[Groups(['getPunish'])] private ?PunishCategory $category = null; #[ORM\ManyToOne(inversedBy: 'punishes', cascade: ["persist"])] private ?School $school = null; #[ORM\ManyToOne(inversedBy: 'punishes')] #[Groups(['getPunish'])] private ?TheClass $classe = null; public function getId(): ?int { return $this->id; } public function getAuthor(): ?User { return $this->author; } public function setAuthor(?User $author): static { $this->author = $author; return $this; } public function getStudent(): ?Student { return $this->student; } public function setStudent(?Student $student): static { $this->student = $student; return $this; } public function getPunishDetails(): ?string { return $this->punishDetails; } public function setPunishDetails(?string $punishDetails): static { $this->punishDetails = $punishDetails; return $this; } public function getYear(): ?SchoolYear { return $this->year; } public function setYear(?SchoolYear $year): static { $this->year = $year; return $this; } public function getCategory(): ?PunishCategory { return $this->category; } public function setCategory(?PunishCategory $category): static { $this->category = $category; return $this; } public function getSchool(): ?School { return $this->school; } public function setSchool(?School $school): static { $this->school = $school; return $this; } public function getClasse(): ?TheClass { return $this->classe; } public function setClasse(?TheClass $classe): static { $this->classe = $classe; return $this; }}