<?php
namespace App\Entity;
use App\Entity\Common\SoftDeletableEntityTrait;
use App\Entity\Common\StatefulEntityTrait;
use App\Entity\Common\TimestampedEntityTrait;
use Doctrine\ORM\Mapping\UniqueConstraint;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Evence\Bundle\SoftDeleteableExtensionBundle\Mapping\Annotation as Evence;
/**
* Class VisaType
*
* @ORM\Entity(repositoryClass="App\Repository\VisaTypeRepository")
* @ORM\Table(indexes={
* @ORM\Index(name="IDX_updated_at", columns={"updated_at"}),
* @ORM\Index(name="IDX_deleted_at", columns={"deleted_at"}),
* @ORM\Index(name="IDX_is_active", columns={"is_active"}) *
* })
* @Gedmo\SoftDeleteable(fieldName="deletedAt")
*/
class VisaType
{
use SoftDeletableEntityTrait, StatefulEntityTrait, TimestampedEntityTrait;
/**
* @var integer
*
* @ORM\Id()
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @var string
*
* @ORM\Column(length=100)
*/
private $name;
/**
* @ORM\ManyToOne(targetEntity="StaVisaType")
* @ORM\JoinColumn(name="visa_type", referencedColumnName="code", onDelete="CASCADE")
*/
private $visaType;
/**
* @var int
*
* @ORM\Column(type="integer")
*/
private $sortOrder;
/**
* @var float
*
* @ORM\Column(type="decimal", precision=13, scale=4)
*/
private $price=0;
/**
* @ORM\ManyToOne(targetEntity="StaCurrency")
* @ORM\JoinColumn(name="currency_code", referencedColumnName="code", onDelete="CASCADE")
*/
private $currency;
/**
* @var float
*
* @ORM\Column(type="decimal", precision=13, scale=4,options={"default":0})
*/
private $cancellationPenalty=0;
/**
* @var string|null
*
* @ORM\Column(length=500,nullable=true)
*/
private $description;
/**
* @var boolean
*
* @ORM\Column(type="boolean",options={"default":1})
*/
private $showPage=true;
public function getId(): int
{
return $this->id;
}
public function setId(int $id): VisaType
{
$this->id = $id;
return $this;
}
public function getName(): string
{
return $this->name;
}
public function setName(string $name): VisaType
{
$this->name = $name;
return $this;
}
/**
* @return mixed
*/
public function getVisaType()
{
return $this->visaType;
}
/**
* @param mixed $visaType
* @return VisaType
*/
public function setVisaType($visaType)
{
$this->visaType = $visaType;
return $this;
}
public function getSortOrder(): int
{
return $this->sortOrder;
}
public function setSortOrder(int $sortOrder): VisaType
{
$this->sortOrder = $sortOrder;
return $this;
}
/**
* @return float|int
*/
public function getPrice()
{
return $this->price;
}
/**
* @param float|int $price
* @return VisaType
*/
public function setPrice($price)
{
$this->price = $price;
return $this;
}
/**
* @return mixed
*/
public function getCurrency()
{
return $this->currency;
}
/**
* @param mixed $currency
* @return VisaType
*/
public function setCurrency($currency)
{
$this->currency = $currency;
return $this;
}
/**
* @return float|int
*/
public function getCancellationPenalty()
{
return $this->cancellationPenalty;
}
/**
* @param float|int $cancellationPenalty
* @return VisaType
*/
public function setCancellationPenalty($cancellationPenalty)
{
$this->cancellationPenalty = $cancellationPenalty;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): VisaType
{
$this->description = $description;
return $this;
}
public function isShowPage(): bool
{
return $this->showPage;
}
public function setShowPage(bool $showPage): VisaType
{
$this->showPage = $showPage;
return $this;
}
}