<?php
namespace App\Entity;
use App\Entity\Common\SoftDeletableEntityTrait;
use App\Entity\Common\StatefulEntityTrait;
use App\Entity\Common\TimestampedEntityTrait;
use Doctrine\Common\Collections\ArrayCollection;
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 CompanyVisaApplication
*
* @ORM\Entity(repositoryClass="App\Repository\CompanyVisaApplicationRepository")
* @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 CompanyVisaApplication
{
use SoftDeletableEntityTrait, StatefulEntityTrait, TimestampedEntityTrait;
public function __construct() {
$this->visaApplicationDocuments = new ArrayCollection();
}
/**
* @var integer
*
* @ORM\Id()
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="Company")
* @ORM\JoinColumn(name="company_id", referencedColumnName="id", onDelete="CASCADE")
*/
private $company;
/**
* @var CompanyUser|null
*
* @ORM\ManyToOne(targetEntity="CompanyUser")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE",nullable=true)
*/
private $user;
/**
* @var string
*
* @ORM\Column(length=100)
*/
private $firstName;
/**
* @var string
*
* @ORM\Column(length=100)
*/
private $lastName;
/**
* @var string
*
* @ORM\Column(length=100)
*/
private $email;
/**
* @var string|null
*
* @ORM\Column(length=50,nullable=true)
*/
private $phone;
/**
* @var string
*
* @ORM\Column(length=50)
*/
private $pasaportNumber;
/**
* @var DateTime|null
*
* @ORM\Column(type="datetime", nullable=true)
*/
private $expireDate;
/**
* @var DateTime|null
*
* @ORM\Column(type="datetime", nullable=true)
*/
private $issueDate;
/**
* @var DateTime|null
*
* @ORM\Column(type="datetime", nullable=true)
*/
private $startDate;
/**
* @ORM\ManyToOne(targetEntity="VisaType")
* @ORM\JoinColumn(name="visa_type", referencedColumnName="id", onDelete="CASCADE")
*/
private $visaType;
/**
* @ORM\ManyToOne(targetEntity="StaVisaStatus")
* @ORM\JoinColumn(name="visa_status", referencedColumnName="code", onDelete="CASCADE")
*/
private $visaStatus;
/**
* @var string|null
*
* @ORM\Column(length=500,nullable=true)
*/
private $remarks;
/**
* @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 $payment=0;
/**
* @ORM\OneToMany(targetEntity="CompanyVisaApplicationDocument", mappedBy="visaApplication")
*/
private $visaApplicationDocuments;
/**
* @var string|null
*
* @ORM\Column(length=1,nullable=true)
*/
private $gender;
/**
* @var LocationCountry|null
* @ORM\ManyToOne(targetEntity="LocationCountry")
* @ORM\JoinColumn(name="country_code", referencedColumnName="code", onDelete="CASCADE",nullable=true)
*/
private $nationality;
/**
* @var DateTime|null
*
* @ORM\Column(type="datetime", nullable=true)
*/
private $travelDate;
/**
* @var string|null
*
* @ORM\Column(length=500,nullable=true)
*/
private $missingDocuments;
/**
* @var Insurance|null
*
* @ORM\ManyToOne(targetEntity="Insurance")
* @ORM\JoinColumn(name="insurance_id", referencedColumnName="id", onDelete="CASCADE",nullable=true)
*/
private $insurance;
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
/**
* @param int $id
*/
public function setId(int $id): void
{
$this->id = $id;
}
/**
* @return mixed
*/
public function getCompany()
{
return $this->company;
}
/**
* @param mixed $company
*/
public function setCompany($company): void
{
$this->company = $company;
}
/**
* @return string
*/
public function getFirstName(): string
{
return $this->firstName;
}
/**
* @param string $firstName
*/
public function setFirstName(string $firstName): void
{
$this->firstName = $firstName;
}
/**
* @return string
*/
public function getLastName(): string
{
return $this->lastName;
}
/**
* @param string $lastName
*/
public function setLastName(string $lastName): void
{
$this->lastName = $lastName;
}
/**
* @return string
*/
public function getEmail(): string
{
return $this->email;
}
/**
* @param string $email
*/
public function setEmail(string $email): void
{
$this->email = $email;
}
/**
* @return string|null
*/
public function getPhone(): ?string
{
return $this->phone;
}
/**
* @param string|null $phone
*/
public function setPhone(?string $phone): void
{
$this->phone = $phone;
}
/**
* @return string
*/
public function getPasaportNumber(): string
{
return $this->pasaportNumber;
}
/**
* @param string $pasaportNumber
*/
public function setPasaportNumber(string $pasaportNumber): void
{
$this->pasaportNumber = $pasaportNumber;
}
/**
* @return DateTime|null
*/
public function getExpireDate(): ?DateTime
{
return $this->expireDate;
}
/**
* @param DateTime|null $expireDate
*/
public function setExpireDate(?DateTime $expireDate): void
{
$this->expireDate = $expireDate;
}
/**
* @return mixed
*/
public function getVisaType()
{
return $this->visaType;
}
/**
* @param mixed $visaType
*/
public function setVisaType($visaType): void
{
$this->visaType = $visaType;
}
/**
* @return DateTime|null
*/
public function getIssueDate(): ?DateTime
{
return $this->issueDate;
}
/**
* @param DateTime|null $issueDate
*/
public function setIssueDate(?DateTime $issueDate): void
{
$this->issueDate = $issueDate;
}
/**
* @return DateTime|null
*/
public function getStartDate(): ?DateTime
{
return $this->startDate;
}
/**
* @param DateTime|null $startDate
*/
public function setStartDate(?DateTime $startDate): void
{
$this->startDate = $startDate;
}
/**
* @return mixed
*/
public function getVisaStatus()
{
return $this->visaStatus;
}
/**
* @param mixed $visaStatus
*/
public function setVisaStatus($visaStatus): void
{
$this->visaStatus = $visaStatus;
}
/**
* @return ArrayCollection
*/
public function getVisaApplicationDocuments()
{
return $this->visaApplicationDocuments;
}
/**
* @param ArrayCollection $visaApplicationDocuments
*/
public function setVisaApplicationDocuments(ArrayCollection $visaApplicationDocuments): void
{
$this->visaApplicationDocuments = $visaApplicationDocuments;
}
/**
* @return string|null
*/
public function getRemarks(): ?string
{
return $this->remarks;
}
/**
* @param string|null $remarks
*/
public function setRemarks(?string $remarks): void
{
$this->remarks = $remarks;
}
/**
* @return float|int
*/
public function getPrice()
{
return $this->price;
}
/**
* @param float|int $price
* @return CompanyVisaApplication
*/
public function setPrice($price)
{
$this->price = $price;
return $this;
}
/**
* @return mixed
*/
public function getCurrency()
{
return $this->currency;
}
/**
* @param mixed $currency
* @return CompanyVisaApplication
*/
public function setCurrency($currency)
{
$this->currency = $currency;
return $this;
}
/**
* @return float|int
*/
public function getPayment()
{
return $this->payment;
}
/**
* @param float|int $payment
* @return CompanyVisaApplication
*/
public function setPayment($payment)
{
$this->payment = $payment;
return $this;
}
public function getUser(): ?CompanyUser
{
return $this->user;
}
public function setUser(?CompanyUser $user): CompanyVisaApplication
{
$this->user = $user;
return $this;
}
public function getGender(): ?string
{
return $this->gender;
}
public function setGender(?string $gender): CompanyVisaApplication
{
$this->gender = $gender;
return $this;
}
public function getNationality(): ?LocationCountry
{
return $this->nationality;
}
public function setNationality(?LocationCountry $nationality): CompanyVisaApplication
{
$this->nationality = $nationality;
return $this;
}
public function getTravelDate(): ?DateTime
{
return $this->travelDate;
}
public function setTravelDate(?DateTime $travelDate): CompanyVisaApplication
{
$this->travelDate = $travelDate;
return $this;
}
public function getMissingDocuments(): ?string
{
return $this->missingDocuments;
}
public function setMissingDocuments(?string $missingDocuments): CompanyVisaApplication
{
$this->missingDocuments = $missingDocuments;
return $this;
}
public function getInsurance(): ?Insurance
{
return $this->insurance;
}
public function setInsurance(?Insurance $insurance): CompanyVisaApplication
{
$this->insurance = $insurance;
return $this;
}
}