mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
54 lines
1.1 KiB
PHP
54 lines
1.1 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Chill is a software for social workers
|
|
*
|
|
* For the full copyright and license information, please view
|
|
* the LICENSE file that was distributed with this source code.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Chill\DocStoreBundle\Entity;
|
|
|
|
use Chill\MainBundle\Entity\HasCenterInterface;
|
|
use Chill\MainBundle\Entity\HasScopeInterface;
|
|
use Chill\PersonBundle\Entity\Person;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
/**
|
|
* @ORM\Table("chill_doc.person_document")
|
|
* @ORM\Entity
|
|
*/
|
|
class PersonDocument extends Document implements HasCenterInterface, HasScopeInterface
|
|
{
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person")
|
|
*
|
|
* @var Person
|
|
*/
|
|
private $person;
|
|
|
|
public function getCenter()
|
|
{
|
|
return $this->getPerson()->getCenter();
|
|
}
|
|
|
|
/**
|
|
* Get person.
|
|
*
|
|
* @return \Chill\MainBundle\Entity\Person
|
|
*/
|
|
public function getPerson()
|
|
{
|
|
return $this->person;
|
|
}
|
|
|
|
public function setPerson($person): self
|
|
{
|
|
$this->person = $person;
|
|
|
|
return $this;
|
|
}
|
|
}
|