src/Entity/Sessions.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SessionsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  6. #[ORM\Entity(repositoryClassSessionsRepository::class)]
  7. #[ORM\Table(name"sessions")]
  8. class Sessions
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     // Relation avec table certyou (si elle existe)
  15.     #[ORM\ManyToOne]
  16.     #[ORM\JoinColumn(name"certyou_id"referencedColumnName"id"nullabletrue)]
  17.     private ?Certyous $certyou null;
  18.     #[ORM\Column(type"string"nullabletrue)]
  19.     private ?string $session null;
  20.     #[ORM\Column(length10)]
  21.     private ?int $adminsid;
  22.     #[ORM\Column(type"datetime"nullabletrueoptions: ['default' => 'CURRENT_TIMESTAMP'])]
  23.     private ?\DateTimeInterface $createdat null;
  24.     #[ORM\Column(type"datetime"nullabletrueoptions: ['default' => 'CURRENT_TIMESTAMP'])]
  25.     private ?\DateTimeInterface $updatedat null;
  26.     
  27.     public function __construct()
  28.     {
  29.         $this->createdat = new \DateTime();
  30.         $this->updatedat = new \DateTime();
  31.     }
  32.     public function getId(): ?int{return $this->id;}
  33.     public function getCertyou(): ?Certyous{ return $this->certyou;}
  34.     public function setCertyou(?Certyous $certyou): self{$this->certyou $certyou;return $this;}
  35.     public function getSession(): ?String{ return $this->session;}
  36.     public function setSession(?String $session): self $this->session $session;return $this;}
  37.     public function getAdminsId(): ?int{return $this->adminsid;}
  38.     public function setAdminsId(int $adminsid): static{$this->adminsid $adminsid;return $this;}
  39.     public function getCreatedAt(): ?\DateTimeInterface{return $this->createdat;}
  40.     public function setCreatedAt(?\DateTimeInterface $createdat): self {$this->createdat $createdat;return $this;}
  41.     
  42.     public function getUpdatedAt(): ?\DateTimeInterface{return $this->updatedat;}
  43.     public function setUpdatedAt(?\DateTimeInterface $updatedat): self {$this->updatedat $updatedat;return $this;}
  44. }