src/Entity/Otpusk/HotelServiceGroups.php line 26

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Otpusk;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass="App\Repository\Otpusk\HotelServiceGroupsRepository")
  8.  *
  9.  * @ORM\Table(
  10.  *     name="hotelServiceGroups",
  11.  *     options={
  12.  *          "charset":"utf8",
  13.  *          "engine": "InnoDB"
  14.  *     },
  15.  *     uniqueConstraints={
  16.  *          @ORM\UniqueConstraint(name="code", columns={"code"})
  17.  *     },
  18.  *     indexes={
  19.  *          @ORM\Index(name="sort", columns={"sort", "active"})
  20.  *     }
  21.  *  )
  22.  */
  23. class HotelServiceGroups
  24. {
  25.     /**
  26.      * @var int
  27.      *
  28.      * @ORM\Column(name="id", type="smallint", nullable=false, options={"unsigned"=true})
  29.      * @ORM\Id
  30.      * @ORM\GeneratedValue(strategy="IDENTITY")
  31.      */
  32.     private $id;
  33.     /**
  34.      * @var string
  35.      *
  36.      * @ORM\Column(name="code", type="string", length=100, nullable=false)
  37.      */
  38.     private $code;
  39.     /**
  40.      * @var int
  41.      *
  42.      * @ORM\Column(name="countryId", type="smallint", nullable=false, options={"unsigned"=true})
  43.      */
  44.     private $countryid;
  45.     /**
  46.      * @var string
  47.      *
  48.      * @ORM\Column(name="name", type="string", length=100, nullable=false)
  49.      */
  50.     private $name;
  51.     /**
  52.      * @var string
  53.      *
  54.      * @ORM\Column(name="nameUkr", type="string", length=100, nullable=false)
  55.      */
  56.     private $nameukr;
  57.     /**
  58.      * @var int
  59.      *
  60.      * @ORM\Column(name="sort", type="integer", nullable=false, options={"default"="0"})
  61.      */
  62.     private $sort '0';
  63.     /**
  64.      * @var bool
  65.      *
  66.      * @ORM\Column(name="active", type="boolean", nullable=false, options={"default"="1"})
  67.      */
  68.     private $active true;
  69.     /**
  70.      * @var Collection
  71.      * @ORM\OneToMany(targetEntity="App\Entity\Otpusk\HotelServices", mappedBy="group")
  72.      */
  73.     private $services;
  74.     /**
  75.      * @ORM\Column(type="string", length=200, nullable=true)
  76.      */
  77.     private $nameEe;
  78.     /**
  79.      * @ORM\Column(type="string", length=200, nullable=true)
  80.      */
  81.     private $nameLt;
  82.     /**
  83.      * @ORM\Column(type="string", length=200, nullable=true)
  84.      */
  85.     private $nameLv;
  86.     /**
  87.      * @ORM\Column(type="string", length=200, nullable=true)
  88.      */
  89.     private $namePl;
  90.     /**
  91.      * @ORM\Column(type="string", length=200, nullable=true)
  92.      */
  93.     private $nameUz;
  94.     /**
  95.      * @ORM\Column(type="string", length=200, nullable=true)
  96.      */
  97.     private $nameRo;
  98.     /**
  99.      * @ORM\Column(type="string", length=200, nullable=true)
  100.      */
  101.     private $nameEn;
  102.     /**
  103.      * @ORM\Column(type="string", length=200, nullable=true)
  104.      */
  105.     private $nameKk;
  106.     public function __construct()
  107.     {
  108.         $this->services = new ArrayCollection();
  109.     }
  110.     public function getId(): ?int
  111.     {
  112.         return $this->id;
  113.     }
  114.     public function getCode(): ?string
  115.     {
  116.         return $this->code;
  117.     }
  118.     public function setCode(string $code): self
  119.     {
  120.         $this->code preg_replace('![^0-9A-Za-z_]!i','',str_replace('-','_',$code));
  121.         return $this;
  122.     }
  123.     public function getCountryid(): ?int
  124.     {
  125.         return $this->countryid;
  126.     }
  127.     public function setCountryid(int $countryid): self
  128.     {
  129.         $this->countryid $countryid;
  130.         return $this;
  131.     }
  132.     public function getName(): ?string
  133.     {
  134.         return $this->name;
  135.     }
  136.     public function setName(string $name): self
  137.     {
  138.         $this->name $name;
  139.         return $this;
  140.     }
  141.     public function getNameukr(): ?string
  142.     {
  143.         return $this->nameukr;
  144.     }
  145.     public function setNameukr(string $nameukr): self
  146.     {
  147.         $this->nameukr $nameukr;
  148.         return $this;
  149.     }
  150.     public function getSort(): ?int
  151.     {
  152.         return $this->sort;
  153.     }
  154.     public function setSort(int $sort): self
  155.     {
  156.         $this->sort $sort;
  157.         return $this;
  158.     }
  159.     public function getActive(): ?bool
  160.     {
  161.         return $this->active;
  162.     }
  163.     public function setActive(bool $active): self
  164.     {
  165.         $this->active $active;
  166.         return $this;
  167.     }
  168.     /**
  169.      * @return Collection
  170.      */
  171.     public function getServices(): Collection
  172.     {
  173.         return $this->services;
  174.     }
  175.     /**
  176.      * @param Collection $services
  177.      */
  178.     public function addServices(Collection $services)
  179.     {
  180.         $this->services $services;
  181.     }
  182.     public function __toString(): string
  183.     {
  184.         return $this->name;
  185.     }
  186.     public function getNameEe(): ?string
  187.     {
  188.         return $this->nameEe;
  189.     }
  190.     public function setNameEe(?string $nameEe): self
  191.     {
  192.         $this->nameEe $nameEe;
  193.         return $this;
  194.     }
  195.     public function getNameLt(): ?string
  196.     {
  197.         return $this->nameLt;
  198.     }
  199.     public function setNameLt(?string $nameLt): self
  200.     {
  201.         $this->nameLt $nameLt;
  202.         return $this;
  203.     }
  204.     public function getNameLv(): ?string
  205.     {
  206.         return $this->nameLv;
  207.     }
  208.     public function setNameLv(?string $nameLv): self
  209.     {
  210.         $this->nameLv $nameLv;
  211.         return $this;
  212.     }
  213.     public function getNamePl(): ?string
  214.     {
  215.         return $this->namePl;
  216.     }
  217.     public function setNamePl(?string $namePl): self
  218.     {
  219.         $this->namePl $namePl;
  220.         return $this;
  221.     }
  222.     public function getNameUz(): ?string
  223.     {
  224.         return $this->nameUz;
  225.     }
  226.     public function setNameUz(?string $nameUz): self
  227.     {
  228.         $this->nameUz $nameUz;
  229.         return $this;
  230.     }
  231.     public function getNameRo(): ?string
  232.     {
  233.         return $this->nameRo;
  234.     }
  235.     public function setNameRo(?string $nameRo): self
  236.     {
  237.         $this->nameRo $nameRo;
  238.         return $this;
  239.     }
  240.     public function getNameEn(): ?string
  241.     {
  242.         return $this->nameEn;
  243.     }
  244.     public function setNameEn(?string $nameEn): self
  245.     {
  246.         $this->nameEn $nameEn;
  247.         return $this;
  248.     }
  249.     public function getNameKk(): ?string
  250.     {
  251.         return $this->nameKk;
  252.     }
  253.     public function setNameKk(?string $nameKk): self
  254.     {
  255.         $this->nameKk $nameKk;
  256.         return $this;
  257.     }
  258. }