protected function readFromDatabase(string $session_id, $ip) : ?Model
    {
        return $this->getModel()
                    ->newQuery()
                    ->where('id', $session_id)
                    ->where('ipv4', $this->getLongIp($ip))
                    ->first();
    }