2018-09-13 14:39:03 +02:00
|
|
|
<?php
|
2018-09-13 16:51:58 +02:00
|
|
|
|
2018-09-13 14:39:03 +02:00
|
|
|
namespace App\Entity;
|
|
|
|
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
2018-09-14 16:05:47 +02:00
|
|
|
use Symfony\Component\Validator\Constraints as Assert;
|
2018-09-13 14:39:03 +02:00
|
|
|
use App\Entity\Attribut\UserAttribut;
|
2018-09-14 14:39:47 +02:00
|
|
|
use App\Entity\Attribut\NameSourceAttribut;
|
2018-09-13 14:39:03 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @author kevinfrantz
|
|
|
|
* @ORM\Table(name="source_user")
|
|
|
|
* @ORM\Entity(repositoryClass="App\Repository\UserSourceRepository")
|
|
|
|
*/
|
|
|
|
class UserSource extends AbstractSource implements UserSourceInterface
|
|
|
|
{
|
2018-09-14 14:39:47 +02:00
|
|
|
use UserAttribut,NameSourceAttribut;
|
2018-09-13 16:51:58 +02:00
|
|
|
|
2018-09-13 14:39:03 +02:00
|
|
|
/**
|
2018-09-14 14:39:47 +02:00
|
|
|
* @ORM\OneToOne(targetEntity="User",cascade={"persist", "remove"})
|
2018-09-13 14:39:03 +02:00
|
|
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
|
2018-09-13 16:51:58 +02:00
|
|
|
*
|
2018-09-13 14:39:03 +02:00
|
|
|
* @var User
|
|
|
|
*/
|
|
|
|
protected $user;
|
2018-09-14 14:39:47 +02:00
|
|
|
|
|
|
|
/**
|
2018-09-14 15:08:51 +02:00
|
|
|
* @Assert\Type(type="App\Entity\NameSource")
|
|
|
|
* @Assert\Valid()
|
2018-09-14 14:39:47 +02:00
|
|
|
* @ORM\OneToOne(targetEntity="NameSource",cascade={"persist", "remove"})
|
|
|
|
* @ORM\JoinColumn(name="name_id", referencedColumnName="id")
|
|
|
|
*
|
|
|
|
* @var NameSourceInterface
|
|
|
|
*/
|
|
|
|
protected $nameSource;
|
|
|
|
|
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
$this->nameSource = new NameSource();
|
|
|
|
parent::__construct();
|
|
|
|
}
|
2018-09-13 14:39:03 +02:00
|
|
|
}
|