Escalafones.php~ 2.47 KB
<?php
/**
 * Created by PhpStorm.
 * User: Wilmer Ramones
 * Date: 29/06/16
 * Time: 07:52 AM
 */

namespace AppBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Escalafones
 *
 * @ORM\Table(name="escalafones", uniqueConstraints={@ORM\UniqueConstraint(name="uq_nombre_escala", columns={"nombre"})})
 * @ORM\Entity
 */
class Escalafones
{
    /**
     * @var string
     *
     * @ORM\Column(name="nombre", type="string", length=50, nullable=false, options={"comment" = "Nombre del escalafon"})
     */
    private $nombre;

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer", nullable=false, options={"comment" = "Identificador del escalafon"})
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     * @ORM\SequenceGenerator(sequenceName="escalafon_id_seq", allocationSize=1, initialValue=1)
     */
    private $id;
    
    /**
     * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Adscripcion", inversedBy="escala")
     * @ORM\JoinColumn(name="adscripcion_id", referencedColumnName="id")
     */
    protected $docente;

    /**
     * Constructor
     */
    public function __construct()
    {
        $this->docente = new \Doctrine\Common\Collections\ArrayCollection();
    }



    /**
     * Set nombre
     *
     * @param string $nombre
     * @return Escalafon
     */
    public function setNombre($nombre)
    {
        $this->nombre = $nombre;

        return $this;
    }

    /**
     * Get nombre
     *
     * @return string
     */
    public function getNombre()
    {
        return $this->nombre;
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Get nombre
     *
     * @return string
     */
    public function __toString()
    {
        return $this->nombre;
    }
    
    
    
    /**
     * Add docente
     *
     * @param \AppBundle\Entity\Adscripcion $docente
     * @return Adscripcion
     */
    public function addDocente(\AppBundle\Entity\Adscripcion $docente)
    {
        $this->docente[] = $docente;

        return $this;
    }

    /**
     * Remove docente
     *
     * @param \AppBundle\Entity\Adscripcion $docente
     */
    public function removeDocente(\AppBundle\Entity\Adscripcion $docente)
    {
        $this->docente->removeElement($docente);
    }

    /**
     * Get docente
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getDocente()
    {
        return $this->docente;
    }



}