<?php

namespace apexl\Io\modules\user\entities;

use apexl\Io\includes\Entity;
use apexl\Io\operators\entityDatabaseOperator;

class sessionEntity extends Entity
{
    public function __construct()
    {
        parent::__construct('sessions');
        $this->setOperator(new entityDatabaseOperator('sessions', 'sessionId'));
    }

    public function getSessionData()
    {
        return json_decode($this->session_data ?? '[]');
    }
}
