169 lines
2.8 KiB
PHP
Raw Normal View History

2017-01-14 17:36:56 +01: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 OpenApi\Annotations as OA;
2017-01-14 17:36:56 +01:00
/**
* @author Guilhem N. <egetick@gmail.com>
*/
class User
{
/**
2017-12-17 10:44:07 +01:00
* @var int
*
* @OA\Property(description = "User id", readOnly = true, title = "userid", default = null)
*/
private $id;
/**
* @OA\Property(type="string", readOnly = false)
*/
private $email;
/**
* User Roles Comment.
*
* @var string[]
*
* @OA\Property(
* description = "User roles",
* title = "roles",
* example="[""ADMIN"",""SUPERUSER""]",
* default = {"user"},
* )
*/
private $roles;
/**
* User Location.
*
* @OA\Property(type = "string")
*/
private $location;
/**
* @var int
*
* @OA\Property(type = "string")
*/
private $friendsNumber;
/**
* @var float
* @OA\Property(default = 0.0)
*/
private $money;
2017-06-25 15:40:07 +02:00
/**
* @var \DateTime
* @OA\Property(property="creationDate")
2017-06-25 15:40:07 +02:00
*/
private $createdAt;
/**
* @var User[]
*/
private $users;
2018-08-30 01:10:36 +02:00
/**
* @var User|null
*/
private $friend;
/**
* @var User[]|null
*/
private $friends;
/**
* @var string
*
* @OA\Property(enum = {"disabled", "enabled"})
*/
private $status;
/**
* @var \DateTimeInterface
*/
private $dateAsInterface;
public function setMoney(float $money)
{
$this->money = $money;
}
/**
* @OA\Property(example=1)
*/
public function setId(int $id)
{
$this->id = $id;
}
public function setEmail($email)
{
$this->email = $email;
}
/**
* @param string[] $roles
*/
public function setRoles(array $roles)
{
$this->roles = $roles;
}
public function setLocation(string $location)
{
}
public function setFriendsNumber(int $friendsNumber)
{
$this->friendsNumber = $friendsNumber;
}
2017-06-25 15:40:07 +02:00
public function setCreatedAt(\DateTime $createAt)
{
}
public function setUsers(array $users)
2017-01-14 17:36:56 +01:00
{
}
2018-08-30 01:10:36 +02:00
public function setFriend(self $friend = null)
{
}
public function setFriends(array $friends = [])
{
}
2017-01-14 17:36:56 +01:00
public function setDummy(Dummy $dummy)
{
}
public function setStatus(string $status)
{
}
public function getDateAsInterface(): \DateTimeInterface
{
return $this->dateAsInterface;
}
public function setDateAsInterface(\DateTimeInterface $dateAsInterface)
{
$this->dateAsInterface = $dateAsInterface;
}
2017-01-14 17:36:56 +01:00
}