From 6fbdc82589e8df811b17fe36cd87bb9cf3fbfb69 Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Fri, 24 Apr 2026 13:21:20 +0300 Subject: [PATCH] add session entity --- app/Auth/Session.php | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 app/Auth/Session.php diff --git a/app/Auth/Session.php b/app/Auth/Session.php new file mode 100644 index 0000000..82bb95d --- /dev/null +++ b/app/Auth/Session.php @@ -0,0 +1,40 @@ +token; + } + + public function getUserId(): int + { + return $this->userId; + } + + public function getCreatedAt(): DateTimeImmutable + { + return $this->createdAt; + } + + public function getExpiresAt(): DateTimeImmutable + { + return $this->expiresAt; + } + + public function isExpired(DateTimeImmutable $now): bool + { + return $now >= $this->expiresAt; + } +}