2017-06-25 15:40:07 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This file is part of the NelmioApiDocBundle package.
|
|
|
|
*
|
|
|
|
* (c) Nelmio
|
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Nelmio\ApiDocBundle\Tests\Functional\Entity;
|
|
|
|
|
|
|
|
use JMS\Serializer\Annotation as Serializer;
|
2017-12-03 20:30:44 +02:00
|
|
|
use Swagger\Annotations as SWG;
|
2017-06-25 15:40:07 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* User.
|
|
|
|
*
|
|
|
|
* @Serializer\ExclusionPolicy("all")
|
|
|
|
*/
|
|
|
|
class JMSUser
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @Serializer\Type("integer")
|
|
|
|
* @Serializer\Expose
|
2017-12-07 14:00:40 +08:00
|
|
|
* @Serializer\Groups({"list"})
|
2017-12-03 20:30:44 +02:00
|
|
|
*
|
2018-01-24 15:20:20 +01:00
|
|
|
* @SWG\Property(description = "User id", readOnly = true, title = "userid", example=1, default = null)
|
2017-06-25 15:40:07 +02:00
|
|
|
*/
|
|
|
|
private $id;
|
|
|
|
|
2017-12-17 17:58:41 +02:00
|
|
|
/**
|
|
|
|
* @Serializer\Type("int")
|
|
|
|
* @Serializer\Expose
|
|
|
|
* @Serializer\SerializedName("daysOnline")
|
|
|
|
*
|
2018-01-24 15:20:20 +01:00
|
|
|
* @SWG\Property(default = 0, minimum = 1, maximum = 300)
|
2017-12-17 17:58:41 +02:00
|
|
|
*/
|
|
|
|
private $daysOnline;
|
|
|
|
|
2017-06-25 15:40:07 +02:00
|
|
|
/**
|
|
|
|
* @Serializer\Type("string")
|
|
|
|
* @Serializer\Expose
|
2017-12-03 20:30:44 +02:00
|
|
|
* @SWG\Property(readOnly = false)
|
2017-12-07 14:00:40 +08:00
|
|
|
* @Serializer\Groups({"details"})
|
2017-06-25 15:40:07 +02:00
|
|
|
*/
|
|
|
|
private $email;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Serializer\Type("array<string>")
|
|
|
|
* @Serializer\Accessor(getter="getRoles", setter="setRoles")
|
|
|
|
* @Serializer\Expose
|
2017-12-17 17:58:41 +02:00
|
|
|
*
|
|
|
|
* @SWG\Property(default = {"user"}, description = "Roles list", example="[""ADMIN"",""SUPERUSER""]", title="roles")
|
2017-06-25 15:40:07 +02:00
|
|
|
*/
|
|
|
|
private $roles;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Serializer\Type("string")
|
|
|
|
*/
|
|
|
|
private $password;
|
|
|
|
|
|
|
|
/**
|
2018-02-19 21:41:05 +01:00
|
|
|
* @SWG\Property(property="last_update", type="date")
|
2018-01-11 12:26:59 +01:00
|
|
|
* @Serializer\Expose
|
|
|
|
*/
|
|
|
|
private $updatedAt;
|
|
|
|
|
|
|
|
/**
|
2017-06-25 15:40:07 +02:00
|
|
|
* Ignored as the JMS serializer can't detect its type.
|
|
|
|
*
|
|
|
|
* @Serializer\Expose
|
|
|
|
*/
|
|
|
|
private $createdAt;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Serializer\Type("array<Nelmio\ApiDocBundle\Tests\Functional\Entity\User>")
|
|
|
|
* @Serializer\Expose
|
|
|
|
*/
|
|
|
|
private $friends;
|
|
|
|
|
2018-04-21 16:57:37 +02:00
|
|
|
/**
|
|
|
|
* @Serializer\Type("array<string, Nelmio\ApiDocBundle\Tests\Functional\Entity\User>")
|
|
|
|
* @Serializer\Expose
|
|
|
|
*/
|
|
|
|
private $indexedFriends;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Serializer\Type("array<string, DateTime>")
|
|
|
|
* @Serializer\Expose
|
|
|
|
*/
|
|
|
|
private $favoriteDates;
|
2018-05-03 13:36:24 -03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @Serializer\Type(Nelmio\ApiDocBundle\Tests\Functional\Entity\CustomDateTime::class)
|
|
|
|
* @Serializer\Expose
|
|
|
|
*/
|
|
|
|
private $customDate;
|
|
|
|
|
2017-12-03 20:30:44 +02:00
|
|
|
/**
|
|
|
|
* @Serializer\Type("integer")
|
|
|
|
* @Serializer\Expose
|
|
|
|
* @Serializer\SerializedName("friendsNumber")
|
|
|
|
*
|
2018-01-24 15:20:20 +01:00
|
|
|
* @SWG\Property(type = "string", minLength = 1, maxLength = 100)
|
2017-12-03 20:30:44 +02:00
|
|
|
*/
|
|
|
|
private $friendsNumber;
|
|
|
|
|
2017-06-25 15:40:07 +02:00
|
|
|
/**
|
|
|
|
* @Serializer\Type(User::class)
|
|
|
|
* @Serializer\Expose
|
|
|
|
*/
|
|
|
|
private $bestFriend;
|
|
|
|
|
2017-12-17 17:58:41 +02:00
|
|
|
/**
|
2017-12-19 08:56:00 +01:00
|
|
|
* Whether this user is enabled or disabled.
|
|
|
|
*
|
|
|
|
* Only enabled users may be used in actions.
|
|
|
|
*
|
|
|
|
* @var string
|
2017-12-17 17:58:41 +02:00
|
|
|
* @Serializer\Type("string")
|
|
|
|
* @Serializer\Expose
|
|
|
|
*
|
|
|
|
* @SWG\Property(enum = {"disabled", "enabled"})
|
|
|
|
*/
|
|
|
|
private $status;
|
|
|
|
|
2019-04-16 12:13:33 +02:00
|
|
|
/**
|
|
|
|
* JMS custom types handled via Custom Type Handlers.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
* @Serializer\Type("VirtualTypeClassDoesNotExistsHandlerDefined")
|
|
|
|
* @Serializer\Expose
|
|
|
|
*/
|
|
|
|
private $virtualType1;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* JMS custom types handled via Custom Type Handlers.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
* @Serializer\Type("VirtualTypeClassDoesNotExistsHandlerNotDefined")
|
|
|
|
* @Serializer\Expose
|
|
|
|
*/
|
|
|
|
private $virtualType2;
|
|
|
|
|
2018-07-23 13:35:05 -03:00
|
|
|
/**
|
|
|
|
* @Serializer\Type("array<array<float>>")
|
|
|
|
* @Serializer\Expose
|
|
|
|
*/
|
|
|
|
private $latLonHistory;
|
|
|
|
|
2018-08-21 12:41:32 -03:00
|
|
|
/**
|
|
|
|
* @Serializer\Type("array<string, array>")
|
|
|
|
* @Serializer\Expose
|
|
|
|
*/
|
|
|
|
private $freeFormObject;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Serializer\Type("array")
|
|
|
|
* @Serializer\Expose
|
|
|
|
*/
|
|
|
|
private $freeFormObjectWithoutType;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Serializer\Type("array<string, array<string, DateTime>>")
|
|
|
|
* @Serializer\Expose
|
|
|
|
*/
|
|
|
|
private $deepObject;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Serializer\Type("array<string, array<DateTime>>")
|
|
|
|
* @Serializer\Expose
|
|
|
|
*/
|
|
|
|
private $deepObjectWithItems;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Serializer\Type("array<array<array<string, array>>>")
|
|
|
|
* @Serializer\Expose
|
|
|
|
*/
|
|
|
|
private $deepFreeFormObjectCollection;
|
|
|
|
|
2020-05-07 20:00:01 +02:00
|
|
|
/**
|
|
|
|
* @Serializer\Type("Nelmio\ApiDocBundle\Tests\Functional\Entity\JMSNote")
|
|
|
|
* @Serializer\Inline()
|
|
|
|
* @Serializer\Expose
|
|
|
|
*/
|
|
|
|
private $notes;
|
|
|
|
|
2017-06-25 15:40:07 +02:00
|
|
|
public function setRoles($roles)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getRoles()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setDummy(Dummy $dummy)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|