<?php
namespace App\Entity\Otpusk;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\Otpusk\TRefsRepository")
*
* @ORM\Table(
* name="tRefs",
* uniqueConstraints={
* @ORM\UniqueConstraint(name="unique", columns={"fBindID", "fRefTypeID", "fLang", "fFromCityId"}),
* },
* indexes={
* @ORM\Index(name="fBindID", columns={"fBindID"}),
* @ORM\Index(name="fPath", columns={"fPath", "fBindID"}),
* @ORM\Index(name="fRefTypeID", columns={"fRefTypeID", "fLang"}),
* @ORM\Index(name="fSort", columns={"fSort"}),
* @ORM\Index(name="confirmAt", columns={"fLang","confirmAt"}),
* },
* )
*/
class TRefsCity
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(name="rec_id", type="integer", options={"unsigned"=true})
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Otpusk\TRefsType"), cascade={"persist"})
* @ORM\JoinColumn(name="fRefTypeID", referencedColumnName="rec_id")
*/
private $fRefTypeID;
/**
* @ORM\Column(type="string", length=32, options={"comment"="Часть пути ЧПУ - не поддерживаетсям"})
*/
private $fPath = "";
/**
* @ORM\Column(type="string", length=200)
*/
private $fImage = "";
/**
* @ORM\Column(type="string", length=255)
*/
private $fTitle = "";
/**
* @ORM\Column(type="text", length=65535, options={"comment"="краткое описание"})
*/
private $fBrief = "";
/**
* @ORM\Column(type="blob")
*/
private $fText = "";
/**
* @ORM\Column(type="string", length=64, options={"comment"="автор"})
*/
private $fWriter = "";
/**
* @ORM\Column(type="datetime", options={"default"="CURRENT_TIMESTAMP", "comment"="дата последнего обновления"})
*/
private $fDate;
/**
* @ORM\Column(type="smallint", nullable=true, options={"comment"="сортировка статей"})
*/
private $fSort;
/**
* @ORM\Column(type="string", nullable=false, length=3, options={"default":"rus"})
*/
private $fLang = "rus";
/**
* @ORM\Column(type="string", length=3, options={"default":"no"}, nullable=false)
*/
private $fAutoTranslate = "no";
/**
* @ORM\Column(type="string", length=175)
*/
private $metaTitle = "";
/**
* @ORM\Column(type="string", length=255)
*/
private $metaDescription = "";
/**
* @ORM\Column(type="string", length=255)
*/
private $metaKeyWords = "";
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Otpusk\City", inversedBy="faqText", cascade={"persist"})
* @ORM\JoinColumn(name="fBindId", referencedColumnName="rec_id")
*/
private $city;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Otpusk\City", inversedBy="citiesText", cascade={"persist"})
* @ORM\JoinColumn(name="fBindId", referencedColumnName="rec_id")
*/
private $text;
/**
* @ORM\Column(name="fFromCityId", type="smallint", nullable=false, options={"default" : 1544, "comment"="город отправления"})
*/
private $fFromCityId = 1544;
/**
* @ORM\Column(name="fLangId", type="integer", nullable=true, options={"unsigned"=true, "comment"="связь с переводом"})
*/
private $fLangId;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*/
private $confirmAt;
public function __construct()
{
$this->fDate = new \DateTime();
}
public function __toString()
{
return $this->getFTitle();
}
public function getId(): ?int
{
return $this->id;
}
public function getFRefTypeID()
{
return $this->fRefTypeID;
}
public function setFRefTypeID($fRefTypeID): self
{
$this->fRefTypeID = $fRefTypeID;
return $this;
}
public function getFPath()
{
return $this->fPath;
}
public function setFPath($fPath): self
{
$this->fPath = $fPath ?: "";
return $this;
}
public function getFImage(): ?string
{
return $this->fImage;
}
public function setFImage(string $fImage): self
{
$this->fImage = $fImage;
return $this;
}
public function getFTitle(): ?string
{
return $this->fTitle;
}
public function setFTitle($fTitle): self
{
$this->fTitle = $fTitle;
return $this;
}
public function getFBrief(): ?string
{
return $this->fBrief;
}
public function setFBrief($fBrief): self
{
$this->fBrief = $fBrief;
return $this;
}
public function getFText(): ?string
{
return $this->fText;
}
public function setFText($fText): self
{
$this->fText = $fText;
return $this;
}
public function getFWriter(): ?string
{
return $this->fWriter;
}
public function setFWriter(string $fWriter): self
{
$this->fWriter = $fWriter;
return $this;
}
public function getFDate(): ?\DateTimeInterface
{
return $this->fDate;
}
public function setFDate(\DateTimeInterface $fDate): self
{
$this->fDate = $fDate;
return $this;
}
public function getFSort(): ?int
{
return $this->fSort;
}
public function setFSort(?int $fSort): self
{
$this->fSort = $fSort;
return $this;
}
public function getFLang(): ?string
{
return $this->fLang;
}
public function setFLang(string $fLang): self
{
$this->fLang = $fLang;
return $this;
}
public function getFAutoTranslate(): ?string
{
return $this->fAutoTranslate;
}
public function setFAutoTranslate(string $fAutoTranslate): self
{
$this->fAutoTranslate = $fAutoTranslate;
return $this;
}
public function getMetaTitle(): ?string
{
return $this->metaTitle;
}
public function setMetaTitle(string $metaTitle): self
{
$this->metaTitle = $metaTitle;
return $this;
}
public function getMetaDescription(): ?string
{
return $this->metaDescription;
}
public function setMetaDescription(string $metaDescription): self
{
$this->metaDescription = $metaDescription;
return $this;
}
public function getMetaKeyWords(): ?string
{
return $this->metaKeyWords;
}
public function setMetaKeyWords(string $metaKeyWords): self
{
$this->metaKeyWords = $metaKeyWords;
return $this;
}
public function getCity()
{
return $this->city;
}
public function addCity($city): self
{
$this->city = $city;
return $this;
}
/**
* @return mixed
*/
public function getFFromCityId()
{
return $this->fFromCityId;
}
/**
* @param mixed $fFromCityId
*/
public function setFFromCityId($fFromCityId): self
{
$this->fFromCityId = $fFromCityId;
return $this;
}
public function getConfirmAt(): ?\DateTimeImmutable
{
return $this->confirmAt;
}
public function setConfirmAt(\DateTimeImmutable $confirmAt): self
{
$this->confirmAt = $confirmAt;
return $this;
}
}