infinito/application/src/Entity/Source/Complex/UserSource.php

45 lines
1.2 KiB
PHP
Raw Normal View History

2018-09-13 14:39:03 +02:00
<?php
2018-09-13 16:51:58 +02:00
2018-11-21 17:55:48 +01:00
namespace App\Entity\Source\Complex;
2018-09-13 14:39:03 +02:00
use Doctrine\ORM\Mapping as ORM;
use App\Entity\Attribut\UserAttribut;
2018-10-03 16:48:16 +02:00
use App\Entity\UserInterface;
2018-11-15 19:55:03 +01:00
use App\Entity\Attribut\PersonIdentitySourceAttribut;
2018-09-13 14:39:03 +02:00
/**
* @author kevinfrantz
2018-11-04 12:00:35 +01:00
* @ORM\Table(name="source_data_user")
2018-09-13 14:39:03 +02:00
* @ORM\Entity(repositoryClass="App\Repository\UserSourceRepository")
*/
class UserSource extends AbstractComplexSource implements UserSourceInterface
2018-09-13 14:39:03 +02:00
{
2018-11-15 19:55:03 +01:00
use UserAttribut,PersonIdentitySourceAttribut;
2018-09-13 16:51:58 +02:00
2018-09-13 14:39:03 +02:00
/**
2018-10-03 16:48:16 +02:00
* @ORM\OneToOne(targetEntity="App\Entity\User",cascade={"persist", "remove"})
* @ORM\JoinColumn(name="user_id", referencedColumnName="id",onDelete="CASCADE")
2018-09-13 16:51:58 +02:00
*
2018-10-03 16:48:16 +02:00
* @var UserInterface
2018-09-13 14:39:03 +02:00
*/
protected $user;
2018-09-14 14:39:47 +02:00
2018-11-15 20:30:34 +01:00
/**
* @ORM\OneToOne(targetEntity="PersonIdentitySource",cascade={"persist", "remove"})
* @ORM\JoinColumn(name="identity_id", referencedColumnName="id",onDelete="CASCADE")
2018-11-15 20:30:34 +01:00
*
* @var PersonIdentitySourceInterface
*/
protected $personIdentitySource;
2018-09-14 14:39:47 +02:00
public function __construct()
{
parent::__construct();
}
2018-11-22 21:54:57 +01:00
public function hasPersonIdentitySource(): bool
{
return isset($this->personIdentitySource);
}
2018-09-13 14:39:03 +02:00
}