Created
May 28, 2013 12:42
-
-
Save xr09/5662502 to your computer and use it in GitHub Desktop.
A Doctrine entity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Cid\FrontBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
use Symfony\Component\Validator\Constraints as Assert; | |
/** | |
* Solicitud | |
* | |
* @ORM\Table() | |
* @ORM\Entity(repositoryClass="Cid\FrontBundle\Entity\SolicitudRepository") | |
*/ | |
class Solicitud | |
{ | |
/** | |
* @var integer | |
* | |
* @ORM\Column(name="id", type="integer") | |
* @ORM\Id | |
* @ORM\GeneratedValue(strategy="AUTO") | |
*/ | |
protected $id; | |
/** | |
* @var string | |
* | |
* @ORM\JoinColumn(nullable=false) | |
* @ORM\ManyToOne(targetEntity="Cid\FrontBundle\Entity\Usuario") | |
*/ | |
protected $usuario; | |
/** | |
* @var string | |
* | |
* @ORM\JoinColumn(nullable=false) | |
* @ORM\ManyToOne(targetEntity="Cid\FrontBundle\Entity\Contrato") | |
*/ | |
protected $contrato; | |
/** | |
* @var string | |
* | |
* | |
* @ORM\Column(name="comprador", type="string", length=50) | |
* @Assert\NotBlank(message="Dato Requerido") | |
*/ | |
protected $comprador; | |
/** | |
* @var \DateTime | |
* | |
* @ORM\Column(name="fecha_sol", type="datetime") | |
*/ | |
protected $fecha_sol; | |
/** | |
* @var \DateTime | |
* | |
* @ORM\Column(name="fecha_act", type="date") | |
* @Assert\NotBlank() | |
*/ | |
protected $fecha_act; | |
/** | |
* @var integer | |
* | |
* @ORM\Column(name="meses_contratados", type="integer") | |
* @Assert\NotBlank(message="Dato Requerido") | |
* @Assert\Min(1) | |
* @Assert\Max(100) | |
*/ | |
protected $meses_contratados; | |
/** | |
* @var string | |
* | |
* @ORM\JoinColumn(nullable=false) | |
* @ORM\ManyToOne(targetEntity="Cid\FrontBundle\Entity\Pago") | |
* @Assert\NotBlank() | |
*/ | |
protected $pago; | |
/** | |
* @var string | |
* | |
* @ORM\Column(name="no_cheque", type="string", length=30, nullable=true) | |
*/ | |
protected $no_cheque; | |
/** | |
* @var float | |
* | |
* @ORM\Column(name="importe", type="float") | |
*/ | |
protected $importe; | |
/** | |
* @var string | |
* | |
* @ORM\ManyToOne(targetEntity="Cid\FrontBundle\Entity\Comentario") | |
*/ | |
protected $comentario; | |
/** | |
* @var string | |
* | |
* @ORM\Column(name="observaciones", type="string", length=30, nullable=true) | |
*/ | |
protected $observaciones; | |
/** | |
* Get id | |
* | |
* @return integer | |
*/ | |
public function getId() | |
{ | |
return $this->id; | |
} | |
/** | |
* Set usuario | |
* | |
* @param string $usuario | |
* @return Solicitud | |
*/ | |
public function setUsuario(\Cid\FrontBundle\Entity\Usuario $usuario) | |
{ | |
$this->usuario = $usuario; | |
return $this; | |
} | |
/** | |
* Get usuario | |
* | |
* @return string | |
*/ | |
public function getUsuario() | |
{ | |
return $this->usuario; | |
} | |
/** | |
* Set contrato | |
* | |
* @param string $contrato | |
* @return Solicitud | |
*/ | |
public function setContrato(\Cid\FrontBundle\Entity\Contrato $contrato) | |
{ | |
$this->contrato = $contrato; | |
return $this; | |
} | |
/** | |
* Get contrato | |
* | |
* @return string | |
*/ | |
public function getContrato() | |
{ | |
return $this->contrato; | |
} | |
/** | |
* Set comprador | |
* | |
* @param string $comprador | |
* @return Solicitud | |
*/ | |
public function setComprador($comprador) | |
{ | |
$this->comprador = $comprador; | |
return $this; | |
} | |
/** | |
* Get comprador | |
* | |
* @return string | |
*/ | |
public function getComprador() | |
{ | |
return $this->comprador; | |
} | |
/** | |
* Set fecha_sol | |
* | |
* @param \DateTime $fechaSol | |
* @return Solicitud | |
*/ | |
public function setFechaSol(\DateTime $fechaSol) | |
{ | |
$this->fecha_sol = $fechaSol; | |
return $this; | |
} | |
/** | |
* Get fecha_sol | |
* | |
* @return \DateTime | |
*/ | |
public function getFechaSol() | |
{ | |
return $this->fecha_sol; | |
} | |
/** | |
* Set fecha_act | |
* | |
* @param \DateTime $fechaAct | |
* @return Solicitud | |
*/ | |
public function setFechaAct(\DateTime $fechaAct) | |
{ | |
$this->fecha_act = $fechaAct; | |
return $this; | |
} | |
/** | |
* Get fecha_act | |
* | |
* @return \DateTime | |
*/ | |
public function getFechaAct() | |
{ | |
return $this->fecha_act; | |
} | |
/** | |
* Set meses_contratados | |
* | |
* @param integer $mesesContratados | |
* @return Solicitud | |
*/ | |
public function setMesesContratados($mesesContratados) | |
{ | |
$this->meses_contratados = $mesesContratados; | |
return $this; | |
} | |
/** | |
* Get meses_contratados | |
* | |
* @return integer | |
*/ | |
public function getMesesContratados() | |
{ | |
return $this->meses_contratados; | |
} | |
/** | |
* Set pago | |
* | |
* @param string $pago | |
* @return Solicitud | |
*/ | |
public function setPago(\Cid\FrontBundle\Entity\Pago $pago) | |
{ | |
$this->pago = $pago; | |
return $this; | |
} | |
/** | |
* Get pago | |
* | |
* @return string | |
*/ | |
public function getPago() | |
{ | |
return $this->pago; | |
} | |
/** | |
* @var string | |
* | |
* @ORM\ManyToOne(targetEntity="Cid\FrontBundle\Entity\Sector") | |
* @Assert\NotBlank() | |
*/ | |
private $sector; | |
/** | |
* Set no_cheque | |
* | |
* @param string $noCheque | |
* @return Solicitud | |
*/ | |
public function setNoCheque($noCheque) | |
{ | |
$this->no_cheque = $noCheque; | |
return $this; | |
} | |
/** | |
* Get no_cheque | |
* | |
* @return string | |
*/ | |
public function getNoCheque() | |
{ | |
return $this->no_cheque; | |
} | |
/** | |
* Set importe | |
* | |
* @param float $importe | |
* @return Solicitud | |
*/ | |
public function setImporte($importe) | |
{ | |
$this->importe = $importe; | |
return $this; | |
} | |
/** | |
* Get importe | |
* | |
* @return float | |
*/ | |
public function getImporte() | |
{ | |
return $this->importe; | |
} | |
/** | |
* Set comentario | |
* | |
* @param string $comentario | |
* @return Solicitud | |
*/ | |
public function setComentario(\Cid\FrontBundle\Entity\Comentario $comentario) | |
{ | |
$this->comentario = $comentario; | |
return $this; | |
} | |
/** | |
* Get comentario | |
* | |
* @return string | |
*/ | |
public function getComentario() | |
{ | |
return $this->comentario; | |
} | |
/** | |
* Set observaciones | |
* | |
* @param string $observaciones | |
* @return Solicitud | |
*/ | |
public function setObservaciones($observaciones) | |
{ | |
$this->observaciones = $observaciones; | |
return $this; | |
} | |
/** | |
* Get observaciones | |
* | |
* @return string | |
*/ | |
public function getObservaciones() | |
{ | |
return $this->observaciones; | |
} | |
/** | |
* Set sector | |
* | |
* @param string $sector | |
* @return Contrato | |
*/ | |
public function setSector(\Cid\FrontBundle\Entity\Sector $sector) | |
{ | |
$this->sector = $sector; | |
return $this; | |
} | |
/** | |
* Get sector | |
* | |
* @return string | |
*/ | |
public function getSector() | |
{ | |
return $this->sector; | |
} | |
/* | |
* function getTelefono | |
* | |
*/ | |
function getTelefono() { | |
return $this->contrato->getTelefono(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment