<?phpnamespace App\Entity\Security;use App\Entity\PrimaryIdTrait;use App\Entity\User\User;use Gedmo\Timestampable\Traits\TimestampableEntity;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity]class ServiceSession{ use TimestampableEntity; #[ORM\Id] #[ORM\GeneratedValue(strategy: 'CUSTOM')] #[ORM\CustomIdGenerator(class: 'App\Doctrine\CustomIdGenerator')] #[ORM\Column(type: 'binary', length: 15)] private $id; /** * @var User */ #[ORM\ManyToOne(targetEntity: 'App\Entity\User\User', inversedBy: 'serviceSession')] private $userId; #[ORM\Column(type: 'string')] private string $ipAddress; #[ORM\Column(type: 'text')] private string $userAgent; #[ORM\Column(type: 'text')] private string $token; #[ORM\Column(type: 'text')] private string $refreshToken; /** * @var bool */ #[ORM\Column(type: 'boolean')] protected bool $active = true; /** * @return int */ public function getId(): int { return $this->id; } /** * @return User|null */ public function getUserId(): ?User { return $this->userId; } /** * @param User $userId */ public function setUserId(User $userId): void { $this->userId = $userId; } public function getIpAddress(): string { return $this->ipAddress; } public function setIpAddress(string $ipAddress): void { $this->ipAddress = $ipAddress; } public function getUserAgent(): string { return $this->userAgent; } public function setUserAgent(?string $userAgent): void { $this->userAgent = $userAgent; } public function getToken(): string { return $this->token; } public function setToken(?string $token): void { $this->token = $token; } public function getRefreshToken(): string { return $this->refreshToken; } public function setRefreshToken(?string $refreshToken): void { $this->refreshToken = $refreshToken; } public function getActive(): ?bool { return $this->active; } public function setActive(bool $active): self { $this->active = $active; return $this; }}