src/Entity/Otpusk/TRefsCity.php line 24

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Otpusk;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\Otpusk\TRefsRepository")
  6.  *
  7.  * @ORM\Table(
  8.  *     name="tRefs",
  9.  *     uniqueConstraints={
  10.  *         @ORM\UniqueConstraint(name="unique", columns={"fBindID", "fRefTypeID", "fLang", "fFromCityId"}),
  11.  *     },
  12.  *     indexes={
  13.  *         @ORM\Index(name="fBindID", columns={"fBindID"}),
  14.  *         @ORM\Index(name="fPath", columns={"fPath", "fBindID"}),
  15.  *         @ORM\Index(name="fRefTypeID", columns={"fRefTypeID", "fLang"}),
  16.  *         @ORM\Index(name="fSort", columns={"fSort"}),
  17.  *         @ORM\Index(name="confirmAt", columns={"fLang","confirmAt"}),
  18.  *     },
  19.  * )
  20.  */
  21. class TRefsCity
  22. {
  23.     /**
  24.      * @ORM\Id()
  25.      * @ORM\GeneratedValue()
  26.      * @ORM\Column(name="rec_id", type="integer", options={"unsigned"=true})
  27.      */
  28.     private $id;
  29.     /**
  30.      * @ORM\ManyToOne(targetEntity="App\Entity\Otpusk\TRefsType"), cascade={"persist"})
  31.      * @ORM\JoinColumn(name="fRefTypeID", referencedColumnName="rec_id")
  32.      */
  33.     private $fRefTypeID;
  34.     /**
  35.      * @ORM\Column(type="string", length=32, options={"comment"="Часть пути ЧПУ - не поддерживаетсям"})
  36.      */
  37.     private $fPath "";
  38.     /**
  39.      * @ORM\Column(type="string", length=200)
  40.      */
  41.     private $fImage "";
  42.     /**
  43.      * @ORM\Column(type="string", length=255)
  44.      */
  45.     private $fTitle "";
  46.     /**
  47.      * @ORM\Column(type="text", length=65535, options={"comment"="краткое описание"})
  48.      */
  49.     private $fBrief "";
  50.     /**
  51.      * @ORM\Column(type="blob")
  52.      */
  53.     private $fText "";
  54.     /**
  55.      * @ORM\Column(type="string", length=64, options={"comment"="автор"})
  56.      */
  57.     private $fWriter "";
  58.     /**
  59.      * @ORM\Column(type="datetime", options={"default"="CURRENT_TIMESTAMP", "comment"="дата последнего обновления"})
  60.      */
  61.     private $fDate;
  62.     /**
  63.      * @ORM\Column(type="smallint", nullable=true, options={"comment"="сортировка статей"})
  64.      */
  65.     private $fSort;
  66.     /**
  67.      * @ORM\Column(type="string", nullable=false, length=3, options={"default":"rus"})
  68.      */
  69.     private $fLang "rus";
  70.     /**
  71.      * @ORM\Column(type="string", length=3, options={"default":"no"}, nullable=false)
  72.      */
  73.     private $fAutoTranslate "no";
  74.     /**
  75.      * @ORM\Column(type="string", length=175)
  76.      */
  77.     private $metaTitle "";
  78.     /**
  79.      * @ORM\Column(type="string", length=255)
  80.      */
  81.     private $metaDescription "";
  82.     /**
  83.      * @ORM\Column(type="string", length=255)
  84.      */
  85.     private $metaKeyWords "";
  86.     /**
  87.      * @ORM\ManyToOne(targetEntity="App\Entity\Otpusk\City", inversedBy="faqText", cascade={"persist"})
  88.      * @ORM\JoinColumn(name="fBindId", referencedColumnName="rec_id")
  89.      */
  90.     private $city;
  91.     /**
  92.      * @ORM\ManyToOne(targetEntity="App\Entity\Otpusk\City", inversedBy="citiesText", cascade={"persist"})
  93.      * @ORM\JoinColumn(name="fBindId", referencedColumnName="rec_id")
  94.      */
  95.     private $text;
  96.     /**
  97.      * @ORM\Column(name="fFromCityId", type="smallint", nullable=false, options={"default" : 1544, "comment"="город отправления"})
  98.      */
  99.     private $fFromCityId 1544;
  100.     /**
  101.      * @ORM\Column(name="fLangId", type="integer", nullable=true, options={"unsigned"=true, "comment"="связь с переводом"})
  102.      */
  103.     private $fLangId;
  104.     /**
  105.      * @ORM\Column(type="datetime_immutable", nullable=true)
  106.      */
  107.     private $confirmAt;
  108.     public function __construct()
  109.     {
  110.         $this->fDate = new \DateTime();
  111.     }
  112.     public function __toString()
  113.     {
  114.         return $this->getFTitle();
  115.     }
  116.     public function getId(): ?int
  117.     {
  118.         return $this->id;
  119.     }
  120.     public function getFRefTypeID()
  121.     {
  122.         return $this->fRefTypeID;
  123.     }
  124.     public function setFRefTypeID($fRefTypeID): self
  125.     {
  126.         $this->fRefTypeID $fRefTypeID;
  127.         return $this;
  128.     }
  129.     public function getFPath()
  130.     {
  131.         return $this->fPath;
  132.     }
  133.     public function setFPath($fPath): self
  134.     {
  135.         $this->fPath $fPath ?: "";
  136.         return $this;
  137.     }
  138.     public function getFImage(): ?string
  139.     {
  140.         return $this->fImage;
  141.     }
  142.     public function setFImage(string $fImage): self
  143.     {
  144.         $this->fImage $fImage;
  145.         return $this;
  146.     }
  147.     public function getFTitle(): ?string
  148.     {
  149.         return $this->fTitle;
  150.     }
  151.     public function setFTitle($fTitle): self
  152.     {
  153.         $this->fTitle $fTitle;
  154.         return $this;
  155.     }
  156.     public function getFBrief(): ?string
  157.     {
  158.         return $this->fBrief;
  159.     }
  160.     public function setFBrief($fBrief): self
  161.     {
  162.         $this->fBrief $fBrief;
  163.         return $this;
  164.     }
  165.     public function getFText(): ?string
  166.     {
  167.         return $this->fText;
  168.     }
  169.     public function setFText($fText): self
  170.     {
  171.         $this->fText $fText;
  172.         return $this;
  173.     }
  174.     public function getFWriter(): ?string
  175.     {
  176.         return $this->fWriter;
  177.     }
  178.     public function setFWriter(string $fWriter): self
  179.     {
  180.         $this->fWriter $fWriter;
  181.         return $this;
  182.     }
  183.     public function getFDate(): ?\DateTimeInterface
  184.     {
  185.         return $this->fDate;
  186.     }
  187.     public function setFDate(\DateTimeInterface $fDate): self
  188.     {
  189.         $this->fDate $fDate;
  190.         return $this;
  191.     }
  192.     public function getFSort(): ?int
  193.     {
  194.         return $this->fSort;
  195.     }
  196.     public function setFSort(?int $fSort): self
  197.     {
  198.         $this->fSort $fSort;
  199.         return $this;
  200.     }
  201.     public function getFLang(): ?string
  202.     {
  203.         return $this->fLang;
  204.     }
  205.     public function setFLang(string $fLang): self
  206.     {
  207.         $this->fLang $fLang;
  208.         return $this;
  209.     }
  210.     public function getFAutoTranslate(): ?string
  211.     {
  212.         return $this->fAutoTranslate;
  213.     }
  214.     public function setFAutoTranslate(string $fAutoTranslate): self
  215.     {
  216.         $this->fAutoTranslate $fAutoTranslate;
  217.         return $this;
  218.     }
  219.     public function getMetaTitle(): ?string
  220.     {
  221.         return $this->metaTitle;
  222.     }
  223.     public function setMetaTitle(string $metaTitle): self
  224.     {
  225.         $this->metaTitle $metaTitle;
  226.         return $this;
  227.     }
  228.     public function getMetaDescription(): ?string
  229.     {
  230.         return $this->metaDescription;
  231.     }
  232.     public function setMetaDescription(string $metaDescription): self
  233.     {
  234.         $this->metaDescription $metaDescription;
  235.         return $this;
  236.     }
  237.     public function getMetaKeyWords(): ?string
  238.     {
  239.         return $this->metaKeyWords;
  240.     }
  241.     public function setMetaKeyWords(string $metaKeyWords): self
  242.     {
  243.         $this->metaKeyWords $metaKeyWords;
  244.         return $this;
  245.     }
  246.     public function getCity()
  247.     {
  248.         return $this->city;
  249.     }
  250.     public function addCity($city): self
  251.     {
  252.         $this->city $city;
  253.         return $this;
  254.     }
  255.     /**
  256.      * @return mixed
  257.      */
  258.     public function getFFromCityId()
  259.     {
  260.         return $this->fFromCityId;
  261.     }
  262.     /**
  263.      * @param mixed $fFromCityId
  264.      */
  265.     public function setFFromCityId($fFromCityId): self
  266.     {
  267.         $this->fFromCityId $fFromCityId;
  268.         return $this;
  269.     }
  270.     public function getConfirmAt(): ?\DateTimeImmutable
  271.     {
  272.         return $this->confirmAt;
  273.     }
  274.     public function setConfirmAt(\DateTimeImmutable $confirmAt): self
  275.     {
  276.         $this->confirmAt $confirmAt;
  277.         return $this;
  278.     }
  279. }