<?php
namespace App\Entity\Otpusk;
use App\Repository\Otpusk\SelectionCriteriaRepository;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Entity(repositoryClass=SelectionCriteriaRepository::class)
*/
class SelectionCriteria
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Otpusk\Selection", inversedBy="criteries")
* @ORM\JoinColumn(name="selection_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
*/
private $selection;
/**
* @ORM\Column(type="integer", nullable=false)
*/
private $hotelId;
/**
* @ORM\Column(type="integer", nullable=false)
*/
private $hotelSelect;
/**
* @ORM\Column(type="string", nullable=false)
*/
private $transport;
/**
* @ORM\Column(type="integer", nullable=false)
*/
private $cityFromId;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $dateNextDaysFrom;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $dateNextDaysTo;
/**
* @ORM\Column(type="boolean", options={"default": 0})
*/
private $dateMinPrice;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $dateFrom;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $dateTo;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $durationFrom;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $durationTo;
/**
* @ORM\Column(type="integer", nullable=false)
*/
private $people;
/**
* @ORM\Column(type="simple_array", nullable=true)
*/
private $food;
/**
* @ORM\Column(type="simple_array", nullable=true)
*/
private $operators;
/**
* @var integer
* @Gedmo\SortablePosition
* @ORM\Column(name="priority", type="integer", options={"default":0}, nullable=true)
*/
private $position = 0;
/**
* @ORM\Column(type="boolean", options={"default": 1})
*/
private $published = true;
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getSelection(): ?Selection
{
return $this->selection;
}
public function setSelection(?Selection $selection): self
{
$this->selection = $selection;
return $this;
}
public function getHotelId(): int
{
return $this->hotelId;
}
public function setHotelId(int $hotelId): self
{
$this->hotelId = $hotelId;
return $this;
}
public function getHotelSelect(): int
{
return $this->hotelSelect;
}
public function setHotelSelect(int $hotelSelect): self
{
$this->hotelSelect = $hotelSelect;
return $this;
}
public function getTransport(): string
{
return $this->transport;
}
public function setTransport(string $transport): self
{
$this->transport = $transport;
return $this;
}
public function getCityFromId(): int
{
return $this->cityFromId;
}
public function setCityFromId(int $cityFromId): self
{
$this->cityFromId = $cityFromId;
return $this;
}
public function getDateNextDaysFrom()
{
return $this->dateNextDaysFrom;
}
public function setDateNextDaysFrom(?int $dateNextDaysFrom): self
{
$this->dateNextDaysFrom = $dateNextDaysFrom;
return $this;
}
public function getDateNextDaysTo()
{
return $this->dateNextDaysTo;
}
public function setDateNextDaysTo(?int $dateNextDaysTo): self
{
$this->dateNextDaysTo = $dateNextDaysTo;
return $this;
}
public function getDateMinPrice(): bool
{
return $this->dateMinPrice;
}
public function setDateMinPrice(bool $dateMinPrice): self
{
$this->dateMinPrice = $dateMinPrice;
return $this;
}
public function getDateFrom()
{
return $this->dateFrom;
}
public function setDateFrom(?\DateTime $dateFrom): self
{
$this->dateFrom = $dateFrom;
return $this;
}
public function getDateTo()
{
return $this->dateTo;
}
public function setDateTo(?\DateTime $dateTo): self
{
$this->dateTo = $dateTo;
return $this;
}
public function getDurationFrom(): ?int
{
return $this->durationFrom;
}
public function setDurationFrom(?int $durationFrom): self
{
$this->durationFrom = $durationFrom;
return $this;
}
public function getDurationTo(): ?int
{
return $this->durationTo;
}
public function setDurationTo(?int $durationTo): self
{
$this->durationTo = $durationTo;
return $this;
}
public function getPeople(): int
{
return $this->people;
}
public function setPeople(int $people): self
{
$this->people = $people;
return $this;
}
public function getFood()
{
return $this->food;
}
public function setFood($food): self
{
$this->food = $food;
return $this;
}
public function getOperators()
{
return $this->operators;
}
public function setOperators($operators): self
{
$this->operators = $operators;
return $this;
}
public function getPosition(): ?int
{
return $this->position;
}
public function setPosition(?int $position): self
{
$this->position = (!is_null($position))?$position:0;
return $this;
}
public function getPublished(): ?bool
{
return $this->published;
}
public function setPublished(bool $published): self
{
$this->published = $published;
return $this;
}
public function __toString()
{
return $this->getName();
}
}