1
0
Fork 0
mirror of synced 2024-06-01 18:39:57 +12:00
appwrite/src/Appwrite/Utopia/Response/Model/HealthTime.php
2022-05-23 14:54:50 +00:00

54 lines
1.3 KiB
PHP

<?php
namespace Appwrite\Utopia\Response\Model;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Model;
class HealthTime extends Model
{
public function __construct()
{
$this
->addRule('remoteTime', [
'type' => self::TYPE_INTEGER,
'description' => 'Current unix timestamp on trustful remote server.',
'default' => 0,
'example' => 1639490751,
])
->addRule('localTime', [
'type' => self::TYPE_INTEGER,
'description' => 'Current unix timestamp of local server where Appwrite runs.',
'default' => 0,
'example' => 1639490844,
])
->addRule('diff', [
'type' => self::TYPE_INTEGER,
'description' => 'Difference of unix remote and local timestamps in milliseconds.',
'default' => 0,
'example' => 93,
])
;
}
/**
* Get Name
*
* @return string
*/
public function getName(): string
{
return 'Health Time';
}
/**
* Get Type
*
* @return string
*/
public function getType(): string
{
return Response::MODEL_HEALTH_TIME;
}
}