<?php
namespace Aviatur\GeneralBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* urlHomologation.
*
* @ORM\Table(name="url_homologation")
* @ORM\Entity
*/
class UrlHomologation
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
*
* @ORM\ManyToOne(targetEntity="Aviatur\AgencyBundle\Entity\Agency", inversedBy="urlHomologation")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="agency_id", referencedColumnName="id")
* })
*/
private ?\Aviatur\AgencyBundle\Entity\Agency $agency = null;
/**
* @var string
*
* @ORM\Column(name="old_url", type="string", length=255)
*/
private $oldUrl;
/**
* @var string
*
* @ORM\Column(name="new_url", type="string", length=255)
*/
private $newUrl;
/**
* @var string
*
* @ORM\Column(name="description", type="string", length=255)
*/
private $description;
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* @var int|null
*
* @ORM\Column(name="code", type="smallint", nullable=true)
*/
private $code = null; // Nuevo campo: puede ser 301, 302 o null
/**
* Set agency.
*
* @param \Aviatur\AgencyBundle\Entity\Agency $agency
*
* @return urlHomologation
*/
public function setAgency(\Aviatur\AgencyBundle\Entity\Agency $agency = null)
{
$this->agency = $agency;
return $this;
}
/**
* Get agency.
*
* @return \Aviatur\AgencyBundle\Entity\Agency
*/
public function getAgency()
{
return $this->agency;
}
/**
* Set oldUrl.
*
* @param string $oldUrl
*
* @return urlHomologation
*/
public function setOldUrl($oldUrl)
{
$this->oldUrl = $oldUrl;
return $this;
}
/**
* Get oldUrl.
*
* @return string
*/
public function getOldUrl()
{
return $this->oldUrl;
}
/**
* Set newUrl.
*
* @param string $newUrl
*
* @return urlHomologation
*/
public function setNewUrl($newUrl)
{
$this->newUrl = $newUrl;
return $this;
}
/**
* Get newUrl.
*
* @return string
*/
public function getNewUrl()
{
return $this->newUrl;
}
/**
* Set description.
*
* @param string $description
*
* @return urlHomologation
*/
public function setDescription($description)
{
$this->description = $description;
return $this;
}
/**
* Get description.
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Set code.
*
* @param int|null $code
*
* @return UrlHomologation
*/
public function setCode(?int $code)
{
$this->code = $code;
return $this;
}
/**
* Get code.
*
* @return int|null
*/
public function getCode(): ?int
{
return $this->code;
}
}