chore: initial import for test contour with k3s CI

This commit is contained in:
sova-bootstrap
2026-05-28 12:09:28 +03:00
commit d77d0a872f
423 changed files with 35401 additions and 0 deletions
View File
+75
View File
@@ -0,0 +1,75 @@
<?php
namespace App\Entity;
use App\Repository\AlertSmsRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=AlertSmsRepository::class)
*/
class AlertSms
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\OneToOne(targetEntity=Record::class, inversedBy="alertSms", cascade={"persist", "remove"})
*/
private $record;
/**
* @ORM\Column(type="datetime")
*/
private $dateCreate;
/**
* @ORM\Column(type="text")
*/
private $response;
public function getId(): ?int
{
return $this->id;
}
public function getRecord(): ?Record
{
return $this->record;
}
public function setRecord(?Record $record): self
{
$this->record = $record;
return $this;
}
public function getDateCreate(): ?\DateTimeInterface
{
return $this->dateCreate;
}
public function setDateCreate(\DateTimeInterface $dateCreate): self
{
$this->dateCreate = $dateCreate;
return $this;
}
public function getResponse(): ?string
{
return $this->response;
}
public function setResponse(string $response): self
{
$this->response = $response;
return $this;
}
}
+93
View File
@@ -0,0 +1,93 @@
<?php
namespace App\Entity;
use App\Repository\BannerRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=BannerRepository::class)
*/
class Banner
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $href;
/**
* @ORM\Column(type="string", length=255)
*/
private $src;
/**
* @ORM\Column(type="boolean")
*/
private $active;
/**
* @ORM\OneToOne(targetEntity=City::class, inversedBy="banner")
* @ORM\JoinColumn(nullable=false)
*/
private $city;
public function getId(): ?int
{
return $this->id;
}
public function getHref(): ?string
{
return $this->href;
}
public function setHref(string $href): self
{
$this->href = $href;
return $this;
}
public function getSrc(): ?string
{
return $this->src;
}
public function setSrc(string $src): self
{
$this->src = $src;
return $this;
}
public function getActive(): ?bool
{
return $this->active;
}
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
public function getCity(): ?City
{
return $this->city;
}
public function setCity(City $city): self
{
$this->city = $city;
return $this;
}
}
+100
View File
@@ -0,0 +1,100 @@
<?php
namespace App\Entity;
use App\Repository\CategoryPageRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=CategoryPageRepository::class)
*/
class CategoryPage
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="boolean", length=255)
*/
private $active;
/**
* @ORM\OneToMany(targetEntity=Page::class, mappedBy="category", orphanRemoval=true)
*/
private $pages;
public function __construct()
{
$this->pages = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getActive(): ?bool
{
return $this->active;
}
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
/**
* @return Collection|Page[]
*/
public function getPages(): Collection
{
return $this->pages;
}
public function addPage(Page $page): self
{
if (!$this->pages->contains($page)) {
$this->pages[] = $page;
$page->setCategory($this);
}
return $this;
}
public function removePage(Page $page): self
{
if ($this->pages->removeElement($page)) {
// set the owning side to null (unless already changed)
if ($page->getCategory() === $this) {
$page->setCategory(null);
}
}
return $this;
}
}
+175
View File
@@ -0,0 +1,175 @@
<?php
namespace App\Entity;
use App\Repository\CityRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=CityRepository::class)
*/
class City
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="integer")
*/
private $regionId;
/**
* @ORM\Column(type="integer")
*/
private $timeZone;
/**
* @ORM\OneToMany(targetEntity=ReviewSource::class, mappedBy="city")
*/
private $reviewSources;
/**
* @ORM\OneToMany(targetEntity=Filial::class, mappedBy="city")
*/
private $filials;
/**
* @ORM\OneToOne(targetEntity=Banner::class, mappedBy="city")
*/
private $banner;
public function __construct()
{
$this->filials = new ArrayCollection();
$this->reviewSources = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getTimeZone(): ?int
{
return $this->timeZone;
}
public function setTimeZone(int $timeZone): self
{
$this->timeZone = $timeZone;
return $this;
}
public function getRegionId(): ?int
{
return $this->regionId;
}
public function setRegionId(int $regionId): self
{
$this->regionId = $regionId;
return $this;
}
public function getBanner(): ?Banner
{
return $this->banner;
}
public function setBanner(Banner $banner): self
{
// set the owning side of the relation if necessary
if ($banner->getCity() !== $this) {
$banner->setCity($this);
}
$this->banner = $banner;
return $this;
}
/**
* @return Collection<int, Filial>
*/
public function getFilials(): Collection
{
return $this->filials;
}
public function addFilial(Filial $filial): static
{
if (!$this->filials->contains($filial)) {
$this->filials->add($filial);
$filial->setCity($this);
}
return $this;
}
public function removeFilial(Filial $filial): static
{
if ($this->filials->removeElement($filial)) {
// set the owning side to null (unless already changed)
if ($filial->getCity() === $this) {
$filial->setCity(null);
}
}
return $this;
}
/**
* @return Collection<int, ReviewSource>
*/
public function getReviewSources(): Collection
{
return $this->reviewSources;
}
public function addReviewSource(ReviewSource $reviewSource): static
{
if (!$this->reviewSources->contains($reviewSource)) {
$this->reviewSources->add($reviewSource);
$reviewSource->setCity($this);
}
return $this;
}
public function removeReviewSource(ReviewSource $reviewSource): static
{
if ($this->reviewSources->removeElement($reviewSource)) {
// set the owning side to null (unless already changed)
if ($reviewSource->getCity() === $this) {
$reviewSource->setCity(null);
}
}
return $this;
}
}
+159
View File
@@ -0,0 +1,159 @@
<?php
namespace App\Entity;
use App\Repository\DepartmentRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=DepartmentRepository::class)
*/
class Department
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="integer")
*/
private $did;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="string", length=255)
*/
private $groupName;
/**
* @ORM\Column(type="boolean")
*/
private $onlineMode;
/**
* @ORM\Column(type="string", length=255)
*/
private $alias;
/**
* @ORM\Column(type="boolean", options={"default" : true})
*/
private $active;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $middleName;
public function getId(): ?int
{
return $this->id;
}
public function getDid(): ?int
{
return $this->did;
}
public function setDid(string $did): self
{
$this->did = $did;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getGroupName(): ?string
{
return $this->groupName;
}
public function setGroupName(string $groupName): self
{
$this->groupName = $groupName;
return $this;
}
public function getOnlineMode(): ?bool
{
return $this->onlineMode;
}
public function setOnlineMode(bool $onlineMode): self
{
$this->onlineMode = $onlineMode;
return $this;
}
public function getAlias(): ?string
{
return $this->alias;
}
public function setAlias(string $alias): self
{
$this->alias = $alias;
return $this;
}
public function getActive(): ?bool
{
return $this->active;
}
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
public function getMiddleName(): ?string
{
return $this->middleName;
}
public function setMiddleName(?string $middleName): self
{
$this->middleName = $middleName;
return $this;
}
public function isOnlineMode(): ?bool
{
return $this->onlineMode;
}
public function isActive(): ?bool
{
return $this->active;
}
public function toArray() {
return get_object_vars($this);
}
}
+75
View File
@@ -0,0 +1,75 @@
<?php
namespace App\Entity;
use App\Repository\DirectCompanyRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=DirectCompanyRepository::class)
*/
class DirectCompany
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="bigint")
*/
private $companyId;
/**
* @ORM\Column(type="string", length=255)
*/
private $city;
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getCompanyId(): ?string
{
return $this->companyId;
}
public function setCompanyId(string $companyId): self
{
$this->companyId = $companyId;
return $this;
}
public function getCity(): ?string
{
return $this->city;
}
public function setCity(string $city): self
{
$this->city = $city;
return $this;
}
}
+160
View File
@@ -0,0 +1,160 @@
<?php
namespace App\Entity;
use App\Repository\DirectReportRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=DirectReportRepository::class)
*/
class DirectReport
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="date")
*/
private $date;
/**
* @ORM\Column(type="bigint")
*/
private $adGroupId;
/**
* @ORM\Column(type="bigint")
*/
private $campaignId;
/**
* @ORM\Column(type="bigint")
*/
private $adId;
/**
* @ORM\Column(type="string", length=255)
*/
private $impressions;
/**
* @ORM\Column(type="integer")
*/
private $clicks;
/**
* @ORM\Column(type="integer")
*/
private $cost;
/**
* @ORM\Column(type="string", length=255)
*/
private $conversions;
public function getId(): ?int
{
return $this->id;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function getAdGroupId(): ?string
{
return $this->adGroupId;
}
public function setAdGroupId(string $adGroupId): self
{
$this->adGroupId = $adGroupId;
return $this;
}
public function getCampaignId(): ?string
{
return $this->campaignId;
}
public function setCampaignId(string $campaignId): self
{
$this->campaignId = $campaignId;
return $this;
}
public function getAdId(): ?string
{
return $this->adId;
}
public function setAdId(string $adId): self
{
$this->adId = $adId;
return $this;
}
public function getImpressions(): ?string
{
return $this->impressions;
}
public function setImpressions(string $impressions): self
{
$this->impressions = $impressions;
return $this;
}
public function getClicks(): ?int
{
return $this->clicks;
}
public function setClicks(int $clicks): self
{
$this->clicks = $clicks;
return $this;
}
public function getCost(): ?int
{
return $this->cost;
}
public function setCost(int $cost): self
{
$this->cost = $cost;
return $this;
}
public function getConversions(): ?string
{
return $this->conversions;
}
public function setConversions(string $conversions): self
{
$this->conversions = $conversions;
return $this;
}
}
+207
View File
@@ -0,0 +1,207 @@
<?php
namespace App\Entity;
use App\Repository\FilialRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=FilialRepository::class)
*/
class Filial
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="integer")
*/
private $fid;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="string", length=255)
*/
private $address;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $addressName;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $siteId;
/**
* @ORM\ManyToOne(targetEntity=City::class, inversedBy="filials")
*/
private $city;
/**
* @ORM\OneToMany(targetEntity=ReviewSource::class, mappedBy="filial", cascade={"persist", "remove"})
*/
private $reviewSources;
/**
* @ORM\Column(type="boolean", options={"default" : true})
*/
private $active;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $company;
public function __construct()
{
$this->reviewSources = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getFid(): ?string
{
return $this->fid;
}
public function setFid(string $fid): self
{
$this->fid = $fid;
return $this;
}
public function getSiteId(): ?int
{
return $this->siteId;
}
public function setSiteId(string $siteId): self
{
$this->siteId = $siteId;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getAddress(): ?string
{
return $this->address;
}
public function setAddress(string $address): self
{
$this->address = $address;
return $this;
}
public function getAddressName(): ?string
{
return $this->addressName;
}
public function setAddressName(?string $addressName): self
{
$this->addressName = $addressName;
return $this;
}
public function getCity(): ?City
{
return $this->city;
}
public function setCity(?City $city): self
{
$this->city = $city;
return $this;
}
/**
* @return Collection<int, ReviewSource>
*/
public function getReviewSources(): Collection
{
return $this->reviewSources;
}
public function addReviewSource(ReviewSource $reviewSource): self
{
if (!$this->reviewSources->contains($reviewSource)) {
$this->reviewSources[] = $reviewSource;
$reviewSource->setFilial($this);
}
return $this;
}
public function removeReviewSource(ReviewSource $reviewSource): self
{
if ($this->reviewSources->removeElement($reviewSource)) {
// set the owning side to null (unless already changed)
if ($reviewSource->getFilial() === $this) {
$reviewSource->setFilial(null);
}
}
return $this;
}
public function getActive(): ?bool
{
return $this->active;
}
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
public function getCompany(): ?string
{
return $this->company;
}
public function setCompany(string $company): self
{
$this->company = $company;
return $this;
}
public function isActive(): ?bool
{
return $this->active;
}
}
+96
View File
@@ -0,0 +1,96 @@
<?php
namespace App\Entity;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(readOnly=true)
* @ORM\Table(name="location_view")
*/
class LocationView
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="integer")
*/
private $dcode;
/**
* @ORM\Column(type="integer")
*/
private $department;
/**
* @ORM\Column(type="integer")
*/
private $filial;
/**
* @ORM\Column(type="integer", name="specialist_id")
*/
private $specialistId;
/**
* @ORM\Column(type="boolean")
*/
private $onlineMode;
/**
* @ORM\Column(type="boolean")
*/
private $active;
/**
* @var datetime $nearestDate
*
* @ORM\Column(type="date", nullable = true)
*/
private $nearestDate;
public function getId(): ?int
{
return $this->id;
}
public function getDcode(): ?int
{
return $this->dcode;
}
public function getDepartment(): ?int
{
return $this->department;
}
public function getFilial(): ?int
{
return $this->filial;
}
public function getSpecialistId(): ?int
{
return $this->specialistId;
}
public function isOnlineMode(): ?bool
{
return $this->onlineMode;
}
public function isActive(): ?bool
{
return $this->active;
}
public function getNearestDate(): ?\DateTimeInterface
{
return $this->nearestDate;
}
}
+110
View File
@@ -0,0 +1,110 @@
<?php
namespace App\Entity;
use App\Repository\PageRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=PageRepository::class)
*/
class Page
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="text")
*/
private $description;
/**
* @ORM\Column(type="boolean")
*/
private $active;
/**
* @ORM\Column(type="string", length=255)
*/
private $alias;
/**
* @ORM\ManyToOne(targetEntity=CategoryPage::class, inversedBy="pages")
* @ORM\JoinColumn(nullable=false)
*/
private $category;
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(string $description): self
{
$this->description = $description;
return $this;
}
public function getActive(): ?bool
{
return $this->active;
}
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
public function getAlias(): ?string
{
return $this->alias;
}
public function setAlias(string $alias): self
{
$this->alias = $alias;
return $this;
}
public function getCategory(): ?CategoryPage
{
return $this->category;
}
public function setCategory(?CategoryPage $category): self
{
$this->category = $category;
return $this;
}
}
+96
View File
@@ -0,0 +1,96 @@
<?php
namespace App\Entity;
use App\Repository\PriceRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=PriceRepository::class)
*/
class Price
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="integer")
*/
private $value;
/**
* @ORM\Column(type="string", length=255)
*/
private $propertyValueId;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $dateUpdate;
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getValue(): ?int
{
return $this->value;
}
public function setValue(int $value): self
{
$this->value = $value;
return $this;
}
public function getPropertyValueId(): ?string
{
return $this->value;
}
public function setPropertyValueId(string $propertyValueId): self
{
$this->propertyValueId = $propertyValueId;
return $this;
}
public function toArray() {
return get_object_vars($this);
}
public function getDateUpdate(): ?\DateTimeInterface
{
return $this->dateUpdate;
}
public function setDateUpdate(\DateTimeInterface $dateUpdate): self
{
$this->dateUpdate = $dateUpdate;
return $this;
}
}
+116
View File
@@ -0,0 +1,116 @@
<?php
namespace App\Entity;
use App\Repository\PriceDepartmentRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=PriceDepartmentRepository::class)
*/
class PriceDepartment
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $name;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $groupId;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $groupName;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $doctCount;
/**
* @ORM\Column(type="boolean")
*/
private $viewInWeb;
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): self
{
$this->name = $name;
return $this;
}
public function getGroupId(): ?int
{
return $this->groupId;
}
public function setGroupId(?int $groupId): self
{
$this->groupId = $groupId;
return $this;
}
public function getGroupName(): ?string
{
return $this->groupName;
}
public function setGroupName(?string $groupName): self
{
$this->groupName = $groupName;
return $this;
}
public function getDoctCount(): ?int
{
return $this->doctCount;
}
public function setDoctCount(?int $doctCount): self
{
$this->doctCount = $doctCount;
return $this;
}
public function getViewInWeb(): ?bool
{
return $this->viewInWeb;
}
public function setViewInWeb(bool $viewInWeb): self
{
$this->viewInWeb = $viewInWeb;
return $this;
}
public function toArray() {
return get_object_vars($this);
}
}
+297
View File
@@ -0,0 +1,297 @@
<?php
namespace App\Entity;
use App\Repository\PriceListRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=PriceListRepository::class)
* @ORM\Entity(readOnly=true)
* @ORM\Table(name="price_list_view")
*/
class PriceList
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $kodoper;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $schname;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $specname;
/**
* @ORM\Column(type="bigint", nullable=true)
*/
private $speccode;
/**
* @ORM\Column(type="json", nullable=true)
*/
private $priceInfo = [];
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $discpercent;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $discprice;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $structname;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $fname;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $filial;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $comment;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $mediaId;
/**
* @ORM\Column(type="datetime")
*/
private $dateUpdate;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $groupId;
public function getId(): ?int
{
return $this->id;
}
public function getKodoper(): ?string
{
return $this->kodoper;
}
public function getSchname(): ?string
{
return $this->schname;
}
public function getSpecname(): ?string
{
return $this->specname;
}
public function getSpeccode(): ?string
{
return $this->speccode;
}
public function getPriceInfo(): ?array
{
return $this->priceInfo;
}
public function getDiscpercent(): ?string
{
return $this->discpercent;
}
public function getDiscprice(): ?string
{
return $this->discprice;
}
public function getStructname(): ?string
{
return $this->structname;
}
public function getFname(): ?string
{
return $this->fname;
}
public function getFilial(): ?int
{
return $this->filial;
}
public function getComment(): ?string
{
return $this->comment;
}
public function getMediaId(): ?int
{
return $this->mediaId;
}
public function getDateUpdate(): ?\DateTimeInterface
{
return $this->dateUpdate;
}
public function getGroupId(): ?int
{
return $this->groupId;
}
public function getActive(): bool
{
if ($this->dateUpdate === null) {
return false;
}
$twoDaysAgo = (new \DateTime())->modify('-2 days');
return $this->dateUpdate >= $twoDaysAgo;
}
public function setKodoper(?string $kodoper): static
{
$this->kodoper = $kodoper;
return $this;
}
public function setSchname(?string $schname): static
{
$this->schname = $schname;
return $this;
}
public function setSpecname(?string $specname): static
{
$this->specname = $specname;
return $this;
}
public function setSpeccode(?string $speccode): static
{
$this->speccode = $speccode;
return $this;
}
public function setPriceInfo(?array $priceInfo): static
{
$this->priceInfo = $priceInfo;
return $this;
}
public function setDiscpercent(?string $discpercent): static
{
$this->discpercent = $discpercent;
return $this;
}
public function setDiscprice(?string $discprice): static
{
$this->discprice = $discprice;
return $this;
}
public function setStructname(?string $structname): static
{
$this->structname = $structname;
return $this;
}
public function setFname(?string $fname): static
{
$this->fname = $fname;
return $this;
}
public function setFilial(?int $filial): static
{
$this->filial = $filial;
return $this;
}
public function setComment(?string $comment): static
{
$this->comment = $comment;
return $this;
}
public function setMediaId(?int $mediaId): static
{
$this->mediaId = $mediaId;
return $this;
}
public function setDateUpdate(\DateTimeInterface $dateUpdate): static
{
$this->dateUpdate = $dateUpdate;
return $this;
}
public function setGroupId(?int $groupId): static
{
$this->groupId = $groupId;
return $this;
}
public function toArray(): array
{
return [
'kodoper' => $this->getKodoper(),
'schname' => $this->getSchname(),
'specname' => $this->getSpecname(),
'speccode' => $this->getSpeccode(),
'priceInfo' => $this->getPriceInfo(),
'discpercent' => $this->getDiscpercent(),
'discprice' => $this->getDiscprice(),
'structname' => $this->getStructname(),
'fname' => $this->getFname(),
'filial' => $this->getFilial(),
'comment' => $this->getComment(),
'mediaId' => $this->getMediaId(),
'dateUpdate' => $this->getDateUpdate() ? $this->getDateUpdate()->format('Y-m-d H:i:s') : null,
'groupId' => $this->getGroupId(),
'active' => $this->getActive()
];
}
}
+137
View File
@@ -0,0 +1,137 @@
<?php
namespace App\Entity;
use App\Repository\RecordRepository;
use Doctrine\ORM\Mapping as ORM;
use App\Bundle\Crypt\AES;
/**
* @ORM\Entity(repositoryClass=RecordRepository::class)
*/
class Record
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="integer")
*/
private $specialistId;
/**
* @ORM\Column(type="string", length=255)
*/
private $phone;
/**
* @ORM\Column(type="datetime")
*/
private $createAt;
/**
* @ORM\Column(type="string", length=255)
*/
private $hash;
/**
* @ORM\Column(type="array")
*/
private $reserve = [];
/**
* @ORM\OneToOne(targetEntity=AlertSms::class, mappedBy="record", cascade={"persist", "remove"})
*/
private $alertSms;
public function getId(): ?int
{
return $this->id;
}
public function getSpecialistId(): ?int
{
return $this->specialistId;
}
public function setSpecialistId(int $specialistId): self
{
$this->specialistId = $specialistId;
return $this;
}
public function getPhone(): ?string
{
return !empty($this->phone)? AES::decrypt($this->phone): $this->phone;
}
public function setPhone(string $phone): self
{
$this->phone = AES::encrypt($phone);
return $this;
}
public function getCreateAt(): ?\DateTimeInterface
{
return $this->createAt;
}
public function setCreateAt(\DateTimeInterface $createAt): self
{
$this->createAt = $createAt;
return $this;
}
public function getHash(): ?string
{
return $this->hash;
}
public function setHash(string $hash): self
{
$this->hash = md5($hash);
return $this;
}
public function getReserve(): ?array
{
return $this->reserve;
}
public function setReserve(array $reserve): self
{
$this->reserve = $reserve;
return $this;
}
public function getAlertSms(): ?AlertSms
{
return $this->alertSms;
}
public function setAlertSms(?AlertSms $alertSms): self
{
// unset the owning side of the relation if necessary
if ($alertSms === null && $this->alertSms !== null) {
$this->alertSms->setRecord(null);
}
// set the owning side of the relation if necessary
if ($alertSms !== null && $alertSms->getRecord() !== $this) {
$alertSms->setRecord($this);
}
$this->alertSms = $alertSms;
return $this;
}
}
+167
View File
@@ -0,0 +1,167 @@
<?php
namespace App\Entity;
use App\Repository\ReviewRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(readOnly=true)
* @ORM\Table(name="remote_review")
* @ORM\Entity(repositoryClass=ReviewRepository::class)
*/
class Review
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="integer")
*/
private $externalId;
/**
* @ORM\Column(type="integer")
*/
private $specialistId;
/**
* @ORM\Column(type="boolean")
*/
private $active;
/**
* @ORM\Column(type="date")
*/
private $dateCreate;
/**
* @ORM\Column(type="text")
*/
private $message;
/**
* @ORM\Column(type="string", length=255)
*/
private $author;
/**
* @ORM\Column(type="float")
*/
private $rating;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $source;
public function getId(): ?int
{
return $this->id;
}
public function getBitrixId(): ?int
{
return $this->externalId;
}
public function setBitrixId(int $externalId): self
{
$this->externalId = $externalId;
return $this;
}
public function getSpecialistId(): ?int
{
return $this->specialistId;
}
public function setSpecialistId(int $specialistId): self
{
$this->specialistId = $specialistId;
return $this;
}
public function getActive(): ?bool
{
return $this->active;
}
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
public function getDateCreate(): ?\DateTimeInterface
{
return $this->dateCreate;
}
public function setDateCreate(\DateTimeInterface $dateCreate): self
{
$this->dateCreate = $dateCreate;
return $this;
}
public function getMessage(): ?string
{
return $this->message;
}
public function setMessage(string $message): self
{
$this->message = $message;
return $this;
}
public function getAuthor(): ?string
{
return $this->author;
}
public function setAuthor(string $author): self
{
$this->author = $author;
return $this;
}
public function getRating(): ?float
{
return $this->rating;
}
public function setRating(float $rating): self
{
$this->rating = $rating;
return $this;
}
public function getSource(): ?string
{
return $this->source;
}
public function setSource(?string $source): self
{
$this->source = $source;
return $this;
}
public function toArray() {
return get_object_vars($this);
}
}
+150
View File
@@ -0,0 +1,150 @@
<?php
namespace App\Entity;
use App\Repository\ReviewSourceRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ReviewSourceRepository::class)
*/
class ReviewSource
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=City::class, inversedBy="reviewSources")
* @ORM\JoinColumn(nullable=false)
*/
private $city;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="integer")
*/
private $countRow;
/**
* @ORM\Column(type="boolean")
*/
private $active;
/**
* @ORM\Column(type="float")
*/
private $rating;
/**
* @ORM\ManyToOne(targetEntity=Filial::class, inversedBy="reviewSources")
*/
private $filial;
/**
* @ORM\Column(type="date")
*/
private $dateCreate;
public function getId(): ?int
{
return $this->id;
}
public function getCity(): ?City
{
return $this->city;
}
public function setCity(City $city): self
{
$this->city = $city;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getCountRow(): ?int
{
return $this->countRow;
}
public function setCountRow(int $countRow): self
{
$this->countRow = $countRow;
return $this;
}
public function getActive(): ?bool
{
return $this->active;
}
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
public function getRating(): ?float
{
return $this->rating;
}
public function setRating(float $rating): self
{
$this->rating = $rating;
return $this;
}
public function getDateCreate(): ?\DateTimeInterface
{
return $this->dateCreate;
}
public function setDateCreate(\DateTimeInterface $dateCreate): self
{
$this->dateCreate = $dateCreate;
return $this;
}
public function isActive(): ?bool
{
return $this->active;
}
public function getFilial(): ?Filial
{
return $this->filial;
}
public function setFilial(?Filial $filial): static
{
$this->filial = $filial;
return $this;
}
}
+233
View File
@@ -0,0 +1,233 @@
<?php
namespace App\Entity;
use App\Entity\LocationView;
use App\Service\SpecialistMoreService;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(readOnly=true)
* @ORM\Table(name="specialist_view")
*/
class SpecialistView
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $kinder;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $speciality;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $category;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $experience;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $description;
/**
* @ORM\Column(type="boolean")
*/
private $infoclinica;
/**
* @ORM\Column(type="string", length=255)
*/
private $alias;
/**
* @ORM\Column(type="string", length=255)
*/
private $dcode;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $sType;
/**
* @ORM\Column(type="boolean")
*/
private $active;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $regionId;
/**
* @ORM\Column(type="json", nullable=true)
*/
private $kodoper;
/**
* @var datetime $updated
*
* @ORM\Column(type="datetime", nullable = true)
*/
private $updated;
/**
* @ORM\Column(type="boolean")
*/
private $acceptsDms;
/**
* @ORM\Column(type="string", length=255)
*/
private $degree;
private SpecialistMoreService $specialistMoreService;
public function getUpdated()
{
return $this->updated;
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function getFio(): ?array
{
$fio = explode(' ', trim($this->name));
if (count($fio) < 3) {
$fio[] = '';
}
return $fio;
}
public function getKinder(): ?string
{
return $this->kinder;
}
public function getSpeciality(): ?string
{
return $this->speciality;
}
public function getCategory(): ?string
{
return $this->category;
}
public function getExperience(): ?string
{
return $this->experience;
}
public function getDescription(): ?string
{
return $this->description;
}
public function getImg(): ?string
{
return $this->id;
}
public function getAlias(): ?string
{
return $this->alias;
}
public function getDcode(): ?string
{
return $this->dcode;
}
public function getSType(): ?int
{
return $this->sType;
}
public function isActive(): bool
{
return $this->active;
}
public function isAcceptsDms(): ?bool
{
return $this->acceptsDms;
}
public function isInfoclinica(): ?bool
{
return $this->infoclinica;
}
public function getRegionId(): ?int
{
return $this->regionId;
}
public function getDegree(): ?string
{
return $this->degree;
}
public function getKodoper(): ?array
{
return $this->kodoper;
}
public function addSpecialistMoreService(
SpecialistMoreService $specialistMoreService
): void {
$this->specialistMoreService = $specialistMoreService;
}
public function getSpecialistMore(): SpecialistMoreService
{
return $this->specialistMoreService->setSpecialist($this->id, $this->kodoper);
}
public function toArray()
{
return [
'name' => $this->getName(),
'kinder' => $this->getKinder(),
'experience' => $this->getExperience(),
'category' => $this->getCategory(),
'description' => $this->getDescription(),
'speciality' => $this->getSpeciality(),
'alias' => $this->getAlias(),
'isAcceptsDms' => $this->isAcceptsDms(),
'degree' => $this->getDegree(),
'updated' => $this->getUpdated()
];
}
}
+268
View File
@@ -0,0 +1,268 @@
<?php
namespace App\Entity;
use App\Repository\UserRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Security\Core\User\UserInterface;
use App\Bundle\Crypt\AES;
/**
* @ORM\Table(name="users")
* @ORM\Entity(repositoryClass=UserRepository::class)
* @UniqueEntity(fields={"uid"}, message="There is already an account with this uid")
*/
class User implements UserInterface
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=180, nullable=true)
*/
private $email;
/**
* @ORM\Column(type="json")
*/
private $roles = [];
/**
* @var string The hashed password
* @ORM\Column(type="string", nullable=true)
*/
private $password;
/**
* @ORM\Column(type="integer", unique=true)
*/
private $uid;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $token;
/**
* @ORM\Column(type="string", length=255)
*/
private $fullName;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $phone;
/**
* @ORM\Column(type="boolean")
*/
private $confirm;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $createdAt;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $lastActivityAt;
public function __construct()
{
$this->calltouches = new ArrayCollection();
$this->createdAt = new \DateTime();
$this->lastActivityAt = new \DateTime();
}
public function getId(): ?int
{
return $this->id;
}
public function getEmail(): ?string
{
return \hex2bin($this->email);
}
public function setEmail(string $email): self
{
$this->email = \bin2hex($email);
return $this;
}
/**
* A visual identifier that represents this user.
*
* @see UserInterface
*/
public function getUsername(): string
{
return (string) \hex2bin($this->email);
}
/**
* @see UserInterface
*/
public function getRoles(): array
{
$roles = $this->roles;
// guarantee every user at least has ROLE_USER
$roles[] = 'ROLE_USER';
return array_unique($roles);
}
public function setRoles(array $roles): self
{
$this->roles = $roles;
return $this;
}
/**
* Получает реальные роли пользователя без автоматически добавленного ROLE_USER
*
* @return array
*/
public function getActualRoles(): array
{
return $this->roles;
}
/**
* @see UserInterface
*/
public function getPassword(): string
{
return $this->password ?? '';
}
public function setPassword(string $password): self
{
$this->password = $password;
return $this;
}
/**
* Returning a salt is only needed, if you are not using a modern
* hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.
*
* @see UserInterface
*/
public function getSalt(): ?string
{
return null;
}
/**
* @see UserInterface
*/
public function eraseCredentials()
{
// If you store any temporary, sensitive data on the user, clear it here
// $this->plainPassword = null;
}
public function getUid(): ?int
{
return $this->uid ?? 0;
}
public function setUid(?int $uid): self
{
$this->uid = $uid;
return $this;
}
public function getToken(): ?string
{
return !empty($this->token)? AES::decrypt($this->token): $this->token;
}
public function setToken(string $token): self
{
$this->token = AES::encrypt($token);
return $this;
}
public function getFullName(): ?string
{
return !empty($this->fullName)? AES::decrypt($this->fullName): $this->fullName;
}
public function setFullName(string $fullName): self
{
$this->fullName = AES::encrypt($fullName);
return $this;
}
public function getPhone(): ?string
{
return !empty($this->phone)? AES::decrypt($this->phone): $this->phone;
}
public function setPhone(string $phone): self
{
$this->phone = AES::encrypt($phone);
return $this;
}
public function getConfirm(): ?bool
{
return $this->confirm;
}
public function setConfirm(bool $confirm): self
{
$this->confirm = $confirm;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getLastActivityAt(): ?\DateTimeInterface
{
return $this->lastActivityAt;
}
public function setLastActivityAt(?\DateTimeInterface $lastActivityAt): self
{
$this->lastActivityAt = $lastActivityAt;
return $this;
}
/**
* Обновляет время последней активности пользователя
*/
public function updateLastActivity(): self
{
$this->lastActivityAt = new \DateTime();
return $this;
}
}
+109
View File
@@ -0,0 +1,109 @@
<?php
namespace App\Entity;
use App\Repository\UsrlogRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=UsrlogRepository::class)
*/
class Usrlog
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $pcode;
/**
* @ORM\Column(type="text")
*/
private $agent;
/**
* @ORM\Column(type="string", length=45)
*/
private $clientIp;
/**
* @ORM\Column(type="string", length=50)
*/
private $method;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
public function getId(): ?int
{
return $this->id;
}
public function getPcode(): ?string
{
return $this->pcode;
}
public function setPcode(string $pcode): self
{
$this->pcode = $pcode;
return $this;
}
public function getAgent(): ?string
{
return $this->agent;
}
public function setAgent(string $agent): self
{
$this->agent = $agent;
return $this;
}
public function getClientIp(): ?string
{
return $this->clientIp;
}
public function setClientIp(string $clientIp): self
{
$this->clientIp = $clientIp;
return $this;
}
public function getMethod(): ?string
{
return $this->method;
}
public function setMethod(string $method): self
{
$this->method = $method;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
}
+88
View File
@@ -0,0 +1,88 @@
<?php
namespace App\Entity;
use App\Repository\WidgetFormRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\Criteria;
/**
* @ORM\Entity(repositoryClass=WidgetFormRepository::class)
*/
class WidgetForm
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\OneToMany(targetEntity=WidgetFormInput::class, mappedBy="widgetForm")
*/
private $widgetFormInputs;
public function __construct()
{
$this->widgetFormInputs = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
/**
* @return Collection|WidgetFormInput[]
*/
public function getWidgetFormInputs(): Collection
{
$expr = Criteria::expr();
$criteria = Criteria::create();
$criteria->orderBy(['sort' => Criteria::ASC]);
return $this->widgetFormInputs->matching($criteria);
}
public function addWidgetFormInput(WidgetFormInput $widgetFormInput): self
{
if (!$this->widgetFormInputs->contains($widgetFormInput)) {
$this->widgetFormInputs[] = $widgetFormInput;
$widgetFormInput->setWidgetForm($this);
}
return $this;
}
public function removeWidgetFormInput(WidgetFormInput $widgetFormInput): self
{
if ($this->widgetFormInputs->removeElement($widgetFormInput)) {
// set the owning side to null (unless already changed)
if ($widgetFormInput->getWidgetForm() === $this) {
$widgetFormInput->setWidgetForm(null);
}
}
return $this;
}
}
+109
View File
@@ -0,0 +1,109 @@
<?php
namespace App\Entity;
use App\Repository\WidgetFormInputRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=WidgetFormInputRepository::class)
*/
class WidgetFormInput
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $text;
/**
* @ORM\Column(type="string", length=255)
*/
private $type;
/**
* @ORM\Column(type="string", length=255)
*/
private $bitrix24Id;
/**
* @ORM\ManyToOne(targetEntity=WidgetForm::class, inversedBy="widgetFormInputs")
*/
private $widgetForm;
/**
* @ORM\Column(type="integer")
*/
private $sort;
public function getId(): ?int
{
return $this->id;
}
public function getText(): ?string
{
return $this->text;
}
public function setText(string $text): self
{
$this->text = $text;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(string $type): self
{
$this->type = $type;
return $this;
}
public function getBitrix24Id(): ?string
{
return $this->bitrix24Id;
}
public function setBitrix24Id(string $bitrix24Id): self
{
$this->bitrix24Id = $bitrix24Id;
return $this;
}
public function getWidgetForm(): ?WidgetForm
{
return $this->widgetForm;
}
public function setWidgetForm(?WidgetForm $widgetForm): self
{
$this->widgetForm = $widgetForm;
return $this;
}
public function getSort(): ?int
{
return $this->sort;
}
public function setSort(int $sort): self
{
$this->sort = $sort;
return $this;
}
}