From 01160b1c5285c64c6297a53a9e56ea065bd172bb Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 11 Aug 2020 17:29:03 +0300 Subject: [PATCH] Added session default values --- src/Appwrite/Utopia/Response/Model/Session.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/Appwrite/Utopia/Response/Model/Session.php b/src/Appwrite/Utopia/Response/Model/Session.php index 96b816f35..39fa8c138 100644 --- a/src/Appwrite/Utopia/Response/Model/Session.php +++ b/src/Appwrite/Utopia/Response/Model/Session.php @@ -18,86 +18,103 @@ class Session extends Model ->addRule('expire', [ 'type' => 'integer', 'description' => 'Session expiration date in Unix timestamp.', + 'default' => 0, 'example' => 1592981250, ]) ->addRule('ip', [ 'type' => 'string', 'description' => 'IP session in use when the session was created.', + 'default' => '', 'example' => '127.0.0.1', ]) ->addRule('osCode', [ 'type' => 'string', 'description' => 'Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).', + 'default' => '', 'example' => 'Mac', ]) ->addRule('osName', [ 'type' => 'string', 'description' => 'Operating system name.', + 'default' => '', 'example' => 'Mac', ]) ->addRule('osVersion', [ 'type' => 'string', 'description' => 'Operating system version.', + 'default' => '', 'example' => 'Mac', ]) ->addRule('clientType', [ 'type' => 'string', 'description' => 'Client type.', + 'default' => '', 'example' => 'browser', ]) ->addRule('clientCode', [ 'type' => 'string', 'description' => 'Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).', + 'default' => '', 'example' => 'CM', ]) ->addRule('clientName', [ 'type' => 'string', 'description' => 'Client name.', + 'default' => '', 'example' => 'Chrome Mobile iOS', ]) ->addRule('clientVersion', [ 'type' => 'string', 'description' => 'Client version.', + 'default' => '', 'example' => '84.0', ]) ->addRule('clientEngine', [ 'type' => 'string', 'description' => 'Client engine name.', + 'default' => '', 'example' => 'WebKit', ]) ->addRule('clientEngineVersion', [ 'type' => 'string', 'description' => 'Client engine name.', + 'default' => '', 'example' => '605.1.15', ]) ->addRule('deviceName', [ 'type' => 'string', 'description' => 'Device name.', + 'default' => '', 'example' => 'smartphone', ]) ->addRule('deviceBrand', [ 'type' => 'string', 'description' => 'Device brand name.', + 'default' => '', 'example' => 'Google', ]) ->addRule('deviceModel', [ 'type' => 'string', 'description' => 'Device model name.', + 'default' => '', 'example' => 'Nexus 5', ]) ->addRule('countryCode', [ 'type' => 'string', 'description' => 'Country two-character ISO 3166-1 alpha code.', + 'default' => '', 'example' => 'US', ]) ->addRule('countryName', [ 'type' => 'string', 'description' => 'Country name.', + 'default' => '', 'example' => 'United States', ]) ->addRule('current', [ 'type' => 'boolean', 'description' => 'Returns true if this the current user session.', + 'default' => '', 'example' => true, ]) ;