src/Entity/Emargement.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity]
  6. #[ORM\Table(name: 'emargement')]
  7. class Emargement
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id = null;
  13.     #[ORM\ManyToOne(targetEntity: Formation::class)]
  14.     #[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')]
  15.     private ?Formation $formation = null;
  16.     #[ORM\ManyToOne(targetEntity: Trainee::class)]
  17.     #[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')]
  18.     private ?Trainee $trainee = null;
  19.     #[ORM\ManyToOne(targetEntity: User::class)]
  20.     #[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')]
  21.     private ?User $trainer = null;
  22.     #[ORM\Column(type: Types::DATE_MUTABLE)]
  23.     private ?\DateTimeInterface $attendanceDate = null;
  24.     #[ORM\Column(length: 100)]
  25.     private ?string $period = null;
  26.     #[ORM\Column(type: Types::DATETIME_MUTABLE)]
  27.     private ?\DateTimeInterface $signedAt = null;
  28.     #[ORM\Column(length: 255, nullable: true)]
  29.     private ?string $company = null;
  30.     #[ORM\Column(type: Types::TEXT, nullable: true)]
  31.     private ?string $comments = null;
  32.     #[ORM\Column(type: Types::TEXT, nullable: true)]
  33.     private ?string $signature = null;
  34.     public function getId(): ?int
  35.     {
  36.         return $this->id;
  37.     }
  38.     public function getFormation(): ?Formation
  39.     {
  40.         return $this->formation;
  41.     }
  42.     public function setFormation(?Formation $formation): self
  43.     {
  44.         $this->formation = $formation;
  45.         return $this;
  46.     }
  47.     public function getTrainee(): ?Trainee
  48.     {
  49.         return $this->trainee;
  50.     }
  51.     public function setTrainee(?Trainee $trainee): self
  52.     {
  53.         $this->trainee = $trainee;
  54.         return $this;
  55.     }
  56.     public function getTrainer(): ?User
  57.     {
  58.         return $this->trainer;
  59.     }
  60.     public function setTrainer(?User $trainer): self
  61.     {
  62.         $this->trainer = $trainer;
  63.         return $this;
  64.     }
  65.     public function getAttendanceDate(): ?\DateTimeInterface
  66.     {
  67.         return $this->attendanceDate;
  68.     }
  69.     public function setAttendanceDate(?\DateTimeInterface $attendanceDate): self
  70.     {
  71.         $this->attendanceDate = $attendanceDate;
  72.         return $this;
  73.     }
  74.     public function getPeriod(): ?string
  75.     {
  76.         return $this->period;
  77.     }
  78.     public function setPeriod(?string $period): self
  79.     {
  80.         $this->period = $period;
  81.         return $this;
  82.     }
  83.     public function getSignedAt(): ?\DateTimeInterface
  84.     {
  85.         return $this->signedAt;
  86.     }
  87.     public function setSignedAt(?\DateTimeInterface $signedAt): self
  88.     {
  89.         $this->signedAt = $signedAt;
  90.         return $this;
  91.     }
  92.     public function getCompany(): ?string
  93.     {
  94.         return $this->company;
  95.     }
  96.     public function setCompany(?string $company): self
  97.     {
  98.         $this->company = $company;
  99.         return $this;
  100.     }
  101.     public function getComments(): ?string
  102.     {
  103.         return $this->comments;
  104.     }
  105.     public function setComments(?string $comments): self
  106.     {
  107.         $this->comments = $comments;
  108.         return $this;
  109.     }
  110.     public function getSignature(): ?string
  111.     {
  112.         return $this->signature;
  113.     }
  114.     public function setSignature(?string $signature): self
  115.     {
  116.         $this->signature = $signature;
  117.         return $this;
  118.     }
  119. }