Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
web
/
vhosts
/
716cf56cb2.url-de-test.ws
/
htdocs_old
/
src
/
Entity
/
//srv/data/web/vhosts/716cf56cb2.url-de-test.ws/htdocs_old/src/Entity/Training.php
<?php namespace App\Entity; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\HttpFoundation\File\File; use Vich\UploaderBundle\Mapping\Annotation as Vich; use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\HttpFoundation\File\UploadedFile; /** * @ORM\Entity(repositoryClass="App\Repository\TrainingRepository") * @Vich\Uploadable */ class Training { /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * NOTE: This is not a mapped field of entity metadata, just a simple property. * * @Vich\UploadableField(mapping="training_pdf", fileNameProperty="pdfName") * @Assert\File( * maxSize = "2048k", * mimeTypes = {"application/pdf", "application/x-pdf"}, * mimeTypesMessage = "Veuillez télécharger un PDF valide" * ) * @var File|null */ private $pdfFile; /** * @ORM\Column(type="string", length=255, nullable=true) * * @var string|null */ private $pdfName; /** * @ORM\Column(type="string", length=255) */ private $title; /** * @ORM\Column(type="text") */ private $goal; /** * @ORM\Column(type="text") */ private $program; /** * @ORM\Column(type="text") */ private $method; /** * @ORM\Column(type="text") */ private $participation; /** * @ORM\Column(type="text") */ private $flow; /** * @ORM\Column(type="string", length=255) * @Assert\Email */ private $email; /** * @ORM\Column(type="datetime") */ private $createdAt; /** * @ORM\Column(type="datetime") */ private $updatedAt; /** * @ORM\Column(type="boolean") */ private $isActive; /** * @ORM\ManyToOne(targetEntity="App\Entity\Job", inversedBy="trainings") */ private $job; public function __construct() { $this->isActive = true; $this->createdAt = new \DateTime(); $this->updatedAt = new \DateTime(); } public function getId(): ?int { return $this->id; } public function getTitle(): ?string { return $this->title; } public function setTitle(string $title): self { $this->title = $title; return $this; } public function getGoal(): ?string { return $this->goal; } public function setGoal(string $goal): self { $this->goal = $goal; return $this; } public function getProgram(): ?string { return $this->program; } public function setProgram(string $program): self { $this->program = $program; return $this; } public function getMethod(): ?string { return $this->method; } public function setMethod(string $method): self { $this->method = $method; return $this; } public function getParticipation(): ?string { return $this->participation; } public function setParticipation(string $participation): self { $this->participation = $participation; return $this; } public function getFlow(): ?string { return $this->flow; } public function setFlow(string $flow): self { $this->flow = $flow; return $this; } public function getEmail(): ?string { return $this->email; } public function setEmail(string $email): self { $this->email = $email; return $this; } public function getCreatedAt(): ?\DateTimeInterface { return $this->createdAt; } public function setCreatedAt(\DateTimeInterface $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getUpdatedAt(): ?\DateTimeInterface { return $this->updatedAt; } public function setUpdatedAt(\DateTimeInterface $updatedAt): self { $this->updatedAt = $updatedAt; return $this; } public function getIsActive(): ?bool { return $this->isActive; } public function setIsActive(bool $isActive): self { $this->isActive = $isActive; return $this; } public function getJob(): ?Job { return $this->job; } public function setJob(?Job $job): self { $this->job = $job; return $this; } /** * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile $imageFile * */ public function setPdfFile(?File $pdfFile = null): void { $this->pdfFile = $pdfFile; if (null !== $pdfFile) { // It is required that at least one field changes if you are using doctrine // otherwise the event listeners won't be called and the file is lost $this->updatedAt = new \DateTimeImmutable(); } } public function getPdfFile(): ?File { return $this->pdfFile; } public function setPdfName(?string $pdfName): void { $this->pdfName = $pdfName; } public function getPdfName(): ?string { return $this->pdfName; } }