<?php
namespace App\Entity;
use App\Repository\SessionsRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
#[ORM\Entity(repositoryClass: SessionsRepository::class)]
#[ORM\Table(name: "sessions")]
class Sessions
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
// Relation avec table certyou (si elle existe)
#[ORM\ManyToOne]
#[ORM\JoinColumn(name: "certyou_id", referencedColumnName: "id", nullable: true)]
private ?Certyous $certyou = null;
#[ORM\Column(type: "string", nullable: true)]
private ?string $session = null;
#[ORM\Column(length: 10)]
private ?int $adminsid;
#[ORM\Column(type: "datetime", nullable: true, options: ['default' => 'CURRENT_TIMESTAMP'])]
private ?\DateTimeInterface $createdat = null;
#[ORM\Column(type: "datetime", nullable: true, options: ['default' => 'CURRENT_TIMESTAMP'])]
private ?\DateTimeInterface $updatedat = null;
public function __construct()
{
$this->createdat = new \DateTime();
$this->updatedat = new \DateTime();
}
public function getId(): ?int{return $this->id;}
public function getCertyou(): ?Certyous{ return $this->certyou;}
public function setCertyou(?Certyous $certyou): self{$this->certyou = $certyou;return $this;}
public function getSession(): ?String{ return $this->session;}
public function setSession(?String $session): self { $this->session = $session;return $this;}
public function getAdminsId(): ?int{return $this->adminsid;}
public function setAdminsId(int $adminsid): static{$this->adminsid = $adminsid;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;}
}