src/Entity/RRHH/Empleado.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\RRHH;
  3. use App\Repository\RRHH\EmpleadoRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=EmpleadoRepository::class)
  7.  * @ORM\Table(name="rrhh_empleado")
  8.  */
  9. class Empleado
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255)
  19.      */
  20.     private $apellido;
  21.     /**
  22.      * @ORM\Column(type="string", length=255, nullable=true)
  23.      */
  24.     private $nombre;
  25.     /**
  26.      * @ORM\Column(type="string", length=255, nullable=true)
  27.      */
  28.     private $legajo;
  29.     /**
  30.      * @ORM\Column(type="string", length=255, nullable=true)
  31.      */
  32.     private $cuit;
  33.     /**
  34.      * @ORM\Column(type="boolean")
  35.      */
  36.     private $empleado true;
  37.     /**
  38.      * @ORM\Column(type="boolean")
  39.      */
  40.     private $activo true;
  41.     public function getLegajoNombre()
  42.     {
  43.         return $this->legajo ' - ' strtoupper($this->apellido ', ' $this->nombre);
  44.     }
  45.     public function __toString()
  46.     {
  47.         return strtoupper($this->apellido ', ' $this->nombre);
  48.     }
  49.     public function getId(): ?int
  50.     {
  51.         return $this->id;
  52.     }
  53.     public function getApellido(): ?string
  54.     {
  55.         return $this->apellido;
  56.     }
  57.     public function setApellido(string $apellido): self
  58.     {
  59.         $this->apellido $apellido;
  60.         return $this;
  61.     }
  62.     public function getNombre(): ?string
  63.     {
  64.         return $this->nombre;
  65.     }
  66.     public function setNombre(string $nombre): self
  67.     {
  68.         $this->nombre $nombre;
  69.         return $this;
  70.     }
  71.     public function getLegajo(): ?string
  72.     {
  73.         return $this->legajo;
  74.     }
  75.     public function setLegajo(string $legajo): self
  76.     {
  77.         $this->legajo $legajo;
  78.         return $this;
  79.     }
  80.     public function isActivo(): ?bool
  81.     {
  82.         return $this->activo;
  83.     }
  84.     public function setActivo(bool $activo): self
  85.     {
  86.         $this->activo $activo;
  87.         return $this;
  88.     }
  89.     public function getCuit(): ?string
  90.     {
  91.         return $this->cuit;
  92.     }
  93.     public function setCuit(?string $cuit): self
  94.     {
  95.         $this->cuit $cuit;
  96.         return $this;
  97.     }
  98.     public function isEmpleado(): ?bool
  99.     {
  100.         return $this->empleado;
  101.     }
  102.     public function setEmpleado(bool $empleado): self
  103.     {
  104.         $this->empleado $empleado;
  105.         return $this;
  106.     }
  107. }