1
0
Fork 0
mirror of synced 2024-09-30 17:26:48 +13:00
appwrite/src/Appwrite/Utopia/Response/Model/Session.php

50 lines
1.1 KiB
PHP
Raw Normal View History

2020-06-24 03:01:20 +12:00
<?php
namespace Appwrite\Utopia\Response\Model;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Model;
class Session extends Model
{
public function __construct()
{
2020-06-24 18:53:13 +12:00
$this
->addRule('$id', [
'type' => 'string',
'description' => 'Session ID.',
'example' => '5e5ea5c16897e',
])
->addRule('expire', [
'type' => 'string',
'description' => 'Session expiration date in unix timestamp.',
'example' => 1592981250,
])
->addRule('ip', [
'type' => 'string',
'description' => 'IP session in use when the session was created.',
'example' => '127.0.0.1',
])
;
2020-06-24 03:01:20 +12:00
}
/**
* Get Name
*
* @return string
*/
public function getName():string
{
return 'Session';
}
/**
* Get Collection
*
* @return string
*/
public function getType():string
{
2020-06-24 18:41:00 +12:00
return Response::MODEL_SESSION;
2020-06-24 03:01:20 +12:00
}
}