<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\UserProfileRepository")
* @ORM\Table(name="users_profiles", indexes={@ORM\Index(name="id_index", columns={"id"})})
*/
class UserProfile
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="userProfiles")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
*/
private $user;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Profile", inversedBy="userProfiles")
* @ORM\JoinColumn(name="profile_id", referencedColumnName="id", nullable=false)
*/
private $profile;
public function getId(): ?int
{
return $this->id;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getProfile(): ?Profile
{
return $this->profile;
}
public function setProfile(?Profile $profile): self
{
$this->profile = $profile;
return $this;
}
}