<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Subuser
*
* @ORM\Table(name="subuser", uniqueConstraints={@ORM\UniqueConstraint(name="subuser_id_uindex", columns={"id"})}, indexes={@ORM\Index(name="subuser_user_id_fk", columns={"user_id"})})
* @ORM\Entity
*/
class Subuser
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var User
*
* @ORM\ManyToOne(targetEntity="User")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
* })
*/
private $user;
/**
* @ORM\OneToOne(targetEntity="Account", mappedBy="subuser")
*/
protected $account;
/**
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* @param int $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return User
*/
public function getUser()
{
return $this->user;
}
/**
* @param User $user
*/
public function setUser($user)
{
$this->user = $user;
}
/**
* @return mixed
*/
public function getAccount()
{
return $this->account;
}
/**
* @param mixed $account
*/
public function setAccount($account)
{
$this->account = $account;
}
}