mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-17 15:54:23 +00:00
76 lines
1.3 KiB
PHP
76 lines
1.3 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/*
|
|
* 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.
|
|
*/
|
|
|
|
namespace Chill\PersonBundle\Entity;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
/**
|
|
* MaritalStatus.
|
|
*/
|
|
#[ORM\Entity]
|
|
#[ORM\HasLifecycleCallbacks]
|
|
#[ORM\Table(name: 'chill_person_marital_status')]
|
|
class MaritalStatus
|
|
{
|
|
#[ORM\Id]
|
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 7)]
|
|
private ?string $id;
|
|
|
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
|
private array $name;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->id = substr(md5(uniqid()), 0, 7);
|
|
}
|
|
|
|
/**
|
|
* Get id.
|
|
*/
|
|
public function getId(): string
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
/**
|
|
* Get name.
|
|
*
|
|
* @return string array
|
|
*/
|
|
public function getName(): array
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
/**
|
|
* Set id.
|
|
*/
|
|
public function setId(string $id): self
|
|
{
|
|
$this->id = $id;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Set name.
|
|
*
|
|
* @param string array $name
|
|
*/
|
|
public function setName(array $name): self
|
|
{
|
|
$this->name = $name;
|
|
|
|
return $this;
|
|
}
|
|
}
|