198 lines
3.4 KiB
PHP
198 lines
3.4 KiB
PHP
<?php
|
|
|
|
namespace AppBundle\Entity;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
/**
|
|
* TravelProgramImage
|
|
*
|
|
* @ORM\Table(name="travel_program_image", indexes={@ORM\Index(name="FK_travel_program_image_travel_program", columns={"program_id"})})
|
|
* @ORM\Entity
|
|
*/
|
|
class TravelProgramImage
|
|
{
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="file_name", type="string", length=255, nullable=true)
|
|
*/
|
|
private $fileName;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="extension", type="string", length=255, nullable=true)
|
|
*/
|
|
private $extension;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="description", type="string", length=255, nullable=true)
|
|
*/
|
|
private $description;
|
|
|
|
/**
|
|
* @var boolean
|
|
*
|
|
* @ORM\Column(name="type", type="boolean", nullable=true)
|
|
*/
|
|
private $type;
|
|
|
|
/**
|
|
* @var integer
|
|
*
|
|
* @ORM\Column(name="id", type="integer")
|
|
* @ORM\Id
|
|
* @ORM\GeneratedValue(strategy="IDENTITY")
|
|
*/
|
|
private $id;
|
|
|
|
/**
|
|
* @var \AppBundle\Entity\TravelProgram
|
|
*
|
|
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\TravelProgram", inversedBy="images")
|
|
* @ORM\JoinColumns({
|
|
* @ORM\JoinColumn(name="program_id", referencedColumnName="id")
|
|
* })
|
|
*/
|
|
private $program;
|
|
|
|
|
|
|
|
/**
|
|
* Set fileName
|
|
*
|
|
* @param string $fileName
|
|
*
|
|
* @return TravelProgramImage
|
|
*/
|
|
public function setFileName($fileName)
|
|
{
|
|
$this->fileName = $fileName;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get fileName
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getFileName()
|
|
{
|
|
return $this->fileName;
|
|
}
|
|
|
|
/**
|
|
* Set extension
|
|
*
|
|
* @param string $extension
|
|
*
|
|
* @return TravelProgramImage
|
|
*/
|
|
public function setExtension($extension)
|
|
{
|
|
$this->extension = $extension;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get extension
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getExtension()
|
|
{
|
|
return $this->extension;
|
|
}
|
|
|
|
/**
|
|
* Set description
|
|
*
|
|
* @param string $description
|
|
*
|
|
* @return TravelProgramImage
|
|
*/
|
|
public function setDescription($description)
|
|
{
|
|
$this->description = $description;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get description
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getDescription()
|
|
{
|
|
return $this->description;
|
|
}
|
|
|
|
/**
|
|
* Set type
|
|
*
|
|
* @param boolean $type
|
|
*
|
|
* @return TravelProgramImage
|
|
*/
|
|
public function setType($type)
|
|
{
|
|
$this->type = $type;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get type
|
|
*
|
|
* @return boolean
|
|
*/
|
|
public function getType()
|
|
{
|
|
return $this->type;
|
|
}
|
|
|
|
/**
|
|
* Get id
|
|
*
|
|
* @return integer
|
|
*/
|
|
public function getId()
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
/**
|
|
* Set program
|
|
*
|
|
* @param \AppBundle\Entity\TravelProgram $program
|
|
*
|
|
* @return TravelProgramImage
|
|
*/
|
|
public function setProgram(\AppBundle\Entity\TravelProgram $program = null)
|
|
{
|
|
$this->program = $program;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get program
|
|
*
|
|
* @return \AppBundle\Entity\TravelProgram
|
|
*/
|
|
public function getProgram()
|
|
{
|
|
return $this->program;
|
|
}
|
|
|
|
public function getFileNameWithExtension()
|
|
{
|
|
return $this->getFileName() . $this->getExtension();
|
|
}
|
|
}
|