mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
126 lines
1.9 KiB
PHP
126 lines
1.9 KiB
PHP
<?php
|
|
|
|
namespace Chill\PersonBundle\Entity;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
/**
|
|
* PersonAltName
|
|
*
|
|
* @ORM\Table(name="chill_person_alt_name")
|
|
* @ORM\Entity(repositoryClass="Chill\PersonBundle\Repository\PersonAltNameRepository")
|
|
*/
|
|
class PersonAltName
|
|
{
|
|
/**
|
|
* @var integer
|
|
*
|
|
* @ORM\Column(name="id", type="integer")
|
|
* @ORM\Id
|
|
* @ORM\GeneratedValue(strategy="AUTO")
|
|
*/
|
|
private $id;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="key", type="string", length=255)
|
|
*/
|
|
private $key;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="label", type="text")
|
|
*/
|
|
private $label;
|
|
|
|
/**
|
|
* @var Person
|
|
*
|
|
* @ORM\ManyToOne(
|
|
* targetEntity="Chill\PersonBundle\Entity\Person",
|
|
* inversedBy="altNames"
|
|
* )
|
|
*/
|
|
private $person;
|
|
|
|
|
|
/**
|
|
* Get id.
|
|
*
|
|
* @return int
|
|
*/
|
|
public function getId()
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
/**
|
|
* Set key.
|
|
*
|
|
* @param string $key
|
|
*
|
|
* @return PersonAltName
|
|
*/
|
|
public function setKey($key)
|
|
{
|
|
$this->key = $key;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get key.
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getKey()
|
|
{
|
|
return $this->key;
|
|
}
|
|
|
|
/**
|
|
* Set label.
|
|
*
|
|
* @param string $label
|
|
*
|
|
* @return PersonAltName
|
|
*/
|
|
public function setLabel($label)
|
|
{
|
|
$this->label = $label;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get label.
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getLabel()
|
|
{
|
|
return $this->label;
|
|
}
|
|
|
|
/**
|
|
* @return Person
|
|
*/
|
|
public function getPerson(): Person
|
|
{
|
|
return $this->person;
|
|
}
|
|
|
|
/**
|
|
* @param Person|null $person
|
|
* @return $this
|
|
*/
|
|
public function setPerson(?Person $person = null)
|
|
{
|
|
$this->person = $person;
|
|
|
|
return $this;
|
|
}
|
|
}
|