Added new entity draft

This commit is contained in:
Kevin Frantz
2018-09-13 14:39:03 +02:00
parent 0ee29d3456
commit 00965aab5c
23 changed files with 331 additions and 34 deletions

View File

@@ -0,0 +1,28 @@
<?php
namespace Entity\Attribut;
use App\Entity\UserSourceInterface;
/**
*
* @author kevinfrantz
*
*/
trait UserSource {
/**
*
* @var UserSourceInterface
* @ORM\OneToOne(targetEntity="UserSource",cascade={"persist", "remove"})
* @ORM\JoinColumn(name="source_user_id", referencedColumnName="id")
*/
protected $userSource;
public function setUserSource(UserSourceInterface $userSource):void{
$this->user = $userSource;
}
public function getUserSource():UserSourceInterface{
return $this->userSource;
}
}