mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
extends User entity + alter admin (WIP)
This commit is contained in:
76
src/Bundle/ChillMainBundle/Entity/UserJob.php
Normal file
76
src/Bundle/ChillMainBundle/Entity/UserJob.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
namespace Chill\MainBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
* @ORM\Table("chill_main_user_job")
|
||||
*/
|
||||
class UserJob
|
||||
{
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
protected ?int $id = null;
|
||||
|
||||
/**
|
||||
* @var array|string[]A
|
||||
* @ORM\Column(name="label", type="json")
|
||||
*/
|
||||
protected array $label = [];
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
* @ORM\Column(name="active", type="boolean")
|
||||
*/
|
||||
protected bool $active = true;
|
||||
|
||||
/**
|
||||
* @return int|null
|
||||
*/
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array|string[]
|
||||
*/
|
||||
public function getLabel(): array
|
||||
{
|
||||
return $this->label;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array|string[] $label
|
||||
* @return UserJob
|
||||
*/
|
||||
public function setLabel(array $label): UserJob
|
||||
{
|
||||
$this->label = $label;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isActive(): bool
|
||||
{
|
||||
return $this->active;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $active
|
||||
* @return UserJob
|
||||
*/
|
||||
public function setActive(bool $active): UserJob
|
||||
{
|
||||
$this->active = $active;
|
||||
return $this;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user