<?php
namespace App\Entity\Otpusk;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\Otpusk\HotelServiceGroupsRepository")
*
* @ORM\Table(
* name="hotelServiceGroups",
* options={
* "charset":"utf8",
* "engine": "InnoDB"
* },
* uniqueConstraints={
* @ORM\UniqueConstraint(name="code", columns={"code"})
* },
* indexes={
* @ORM\Index(name="sort", columns={"sort", "active"})
* }
* )
*/
class HotelServiceGroups
{
/**
* @var int
*
* @ORM\Column(name="id", type="smallint", nullable=false, options={"unsigned"=true})
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="code", type="string", length=100, nullable=false)
*/
private $code;
/**
* @var int
*
* @ORM\Column(name="countryId", type="smallint", nullable=false, options={"unsigned"=true})
*/
private $countryid;
/**
* @var string
*
* @ORM\Column(name="name", type="string", length=100, nullable=false)
*/
private $name;
/**
* @var string
*
* @ORM\Column(name="nameUkr", type="string", length=100, nullable=false)
*/
private $nameukr;
/**
* @var int
*
* @ORM\Column(name="sort", type="integer", nullable=false, options={"default"="0"})
*/
private $sort = '0';
/**
* @var bool
*
* @ORM\Column(name="active", type="boolean", nullable=false, options={"default"="1"})
*/
private $active = true;
/**
* @var Collection
* @ORM\OneToMany(targetEntity="App\Entity\Otpusk\HotelServices", mappedBy="group")
*/
private $services;
/**
* @ORM\Column(type="string", length=200, nullable=true)
*/
private $nameEe;
/**
* @ORM\Column(type="string", length=200, nullable=true)
*/
private $nameLt;
/**
* @ORM\Column(type="string", length=200, nullable=true)
*/
private $nameLv;
/**
* @ORM\Column(type="string", length=200, nullable=true)
*/
private $namePl;
/**
* @ORM\Column(type="string", length=200, nullable=true)
*/
private $nameUz;
/**
* @ORM\Column(type="string", length=200, nullable=true)
*/
private $nameRo;
/**
* @ORM\Column(type="string", length=200, nullable=true)
*/
private $nameEn;
/**
* @ORM\Column(type="string", length=200, nullable=true)
*/
private $nameKk;
public function __construct()
{
$this->services = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getCode(): ?string
{
return $this->code;
}
public function setCode(string $code): self
{
$this->code = preg_replace('![^0-9A-Za-z_]!i','',str_replace('-','_',$code));
return $this;
}
public function getCountryid(): ?int
{
return $this->countryid;
}
public function setCountryid(int $countryid): self
{
$this->countryid = $countryid;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getNameukr(): ?string
{
return $this->nameukr;
}
public function setNameukr(string $nameukr): self
{
$this->nameukr = $nameukr;
return $this;
}
public function getSort(): ?int
{
return $this->sort;
}
public function setSort(int $sort): self
{
$this->sort = $sort;
return $this;
}
public function getActive(): ?bool
{
return $this->active;
}
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
/**
* @return Collection
*/
public function getServices(): Collection
{
return $this->services;
}
/**
* @param Collection $services
*/
public function addServices(Collection $services)
{
$this->services = $services;
}
public function __toString(): string
{
return $this->name;
}
public function getNameEe(): ?string
{
return $this->nameEe;
}
public function setNameEe(?string $nameEe): self
{
$this->nameEe = $nameEe;
return $this;
}
public function getNameLt(): ?string
{
return $this->nameLt;
}
public function setNameLt(?string $nameLt): self
{
$this->nameLt = $nameLt;
return $this;
}
public function getNameLv(): ?string
{
return $this->nameLv;
}
public function setNameLv(?string $nameLv): self
{
$this->nameLv = $nameLv;
return $this;
}
public function getNamePl(): ?string
{
return $this->namePl;
}
public function setNamePl(?string $namePl): self
{
$this->namePl = $namePl;
return $this;
}
public function getNameUz(): ?string
{
return $this->nameUz;
}
public function setNameUz(?string $nameUz): self
{
$this->nameUz = $nameUz;
return $this;
}
public function getNameRo(): ?string
{
return $this->nameRo;
}
public function setNameRo(?string $nameRo): self
{
$this->nameRo = $nameRo;
return $this;
}
public function getNameEn(): ?string
{
return $this->nameEn;
}
public function setNameEn(?string $nameEn): self
{
$this->nameEn = $nameEn;
return $this;
}
public function getNameKk(): ?string
{
return $this->nameKk;
}
public function setNameKk(?string $nameKk): self
{
$this->nameKk = $nameKk;
return $this;
}
}