From 2fbe21a032e580606b1d0a91fcca91c46eca177b Mon Sep 17 00:00:00 2001
From: "a.shamavov" <a.shamavov@iqdev.digital>
Date: Tue, 23 Apr 2024 14:12:41 +0500
Subject: [PATCH] =?UTF-8?q?STA-966=20|=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2?=
 =?UTF-8?q?=D0=B8=D0=BB=20=D0=BD=D0=BE=D0=B2=D1=8B=D0=B5=20=D0=BC=D0=BE?=
 =?UTF-8?q?=D0=B4=D0=B5=D0=BB=D0=B8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/Model/File.php                     |  59 +++++++++
 src/Model/KitchenType.php              |  33 +++++
 src/Model/NewsCategory.php             |  33 +++++
 src/Model/NewsDetailElement.php        |  83 ++++++++++++
 src/Model/NewsFilterVariants.php       |  23 ++++
 src/Model/NewsList.php                 |  40 ++++++
 src/Model/NewsListingElement.php       |  59 +++++++++
 src/Model/Pagination.php               |  32 +++++
 src/Model/RestaurantDetailElement.php  | 175 +++++++++++++++++++++++++
 src/Model/RestaurantFilterVariants.php |  33 +++++
 src/Model/RestaurantList.php           |  40 ++++++
 src/Model/RestaurantListingElement.php |  67 ++++++++++
 src/Model/RestaurantType.php           |  32 +++++
 src/Model/Review.php                   |  53 ++++++++
 src/Model/Tag.php                      |  30 +++++
 15 files changed, 792 insertions(+)
 create mode 100644 src/Model/File.php
 create mode 100644 src/Model/KitchenType.php
 create mode 100644 src/Model/NewsCategory.php
 create mode 100644 src/Model/NewsDetailElement.php
 create mode 100644 src/Model/NewsFilterVariants.php
 create mode 100644 src/Model/NewsList.php
 create mode 100644 src/Model/NewsListingElement.php
 create mode 100644 src/Model/Pagination.php
 create mode 100644 src/Model/RestaurantDetailElement.php
 create mode 100644 src/Model/RestaurantFilterVariants.php
 create mode 100644 src/Model/RestaurantList.php
 create mode 100644 src/Model/RestaurantListingElement.php
 create mode 100644 src/Model/RestaurantType.php
 create mode 100644 src/Model/Review.php
 create mode 100644 src/Model/Tag.php

diff --git a/src/Model/File.php b/src/Model/File.php
new file mode 100644
index 0000000..2cbf0a7
--- /dev/null
+++ b/src/Model/File.php
@@ -0,0 +1,59 @@
+<?php
+
+namespace App\Model;
+
+class File
+{
+    private int $id;
+    private string $name;
+    private string $description;
+    private int $size;
+    private string $type;
+    private string $url;
+
+    public function __construct(
+        int $id,
+        string $name,
+        string $description,
+        int $size,
+        string $type,
+        string $url
+    ) {
+        $this->id = $id;
+        $this->name = $name;
+        $this->description = $description;
+        $this->size = $size;
+        $this->type = $type;
+        $this->url = $url;
+    }
+
+    public function getId(): int
+    {
+        return $this->id;
+    }
+
+    public function getName(): string
+    {
+        return $this->name;
+    }
+
+    public function getDescription(): string
+    {
+        return $this->description;
+    }
+
+    public function getSize(): int
+    {
+        return $this->size;
+    }
+
+    public function getType(): string
+    {
+        return $this->type;
+    }
+
+    public function getUrl(): string
+    {
+        return $this->url;
+    }
+}
\ No newline at end of file
diff --git a/src/Model/KitchenType.php b/src/Model/KitchenType.php
new file mode 100644
index 0000000..b9d532b
--- /dev/null
+++ b/src/Model/KitchenType.php
@@ -0,0 +1,33 @@
+<?php
+
+namespace App\Model;
+
+class KitchenType
+{
+    private int $id;
+    private string $name;
+    private string $code;
+
+
+    public function __construct(int $id, string $name, string $code)
+    {
+        $this->id = $id;
+        $this->name = $name;
+        $this->code = $code;
+    }
+
+    public function getId(): int
+    {
+        return $this->id;
+    }
+
+    public function getName(): string
+    {
+        return $this->name;
+    }
+
+    public function getCode(): string
+    {
+        return $this->code;
+    }
+}
\ No newline at end of file
diff --git a/src/Model/NewsCategory.php b/src/Model/NewsCategory.php
new file mode 100644
index 0000000..ba1e1a5
--- /dev/null
+++ b/src/Model/NewsCategory.php
@@ -0,0 +1,33 @@
+<?php
+
+namespace App\Model;
+
+class NewsCategory
+{
+    private int $id;
+    private string $name;
+    private string $code;
+
+
+    public function __construct(int $id, string $name, string $code)
+    {
+        $this->id = $id;
+        $this->name = $name;
+        $this->code = $code;
+    }
+
+    public function getId(): int
+    {
+        return $this->id;
+    }
+
+    public function getName(): string
+    {
+        return $this->name;
+    }
+
+    public function getCode(): string
+    {
+        return $this->code;
+    }
+}
\ No newline at end of file
diff --git a/src/Model/NewsDetailElement.php b/src/Model/NewsDetailElement.php
new file mode 100644
index 0000000..99b3453
--- /dev/null
+++ b/src/Model/NewsDetailElement.php
@@ -0,0 +1,83 @@
+<?php
+
+namespace App\Model;
+
+class NewsDetailElement
+{
+    private int $id;
+    private string $name;
+    private string $description;
+    private string $text;
+    private File $image;
+    private string $createAt;
+    private string $seoTitle;
+    private string $seoDescription;
+    private string $seoKeywords;
+
+    public function __construct(
+        int    $id,
+        string $name,
+        string $description,
+        string $text,
+        File   $image,
+        string $createAt,
+        string $seoTitle,
+        string $seoDescription,
+        string $seoKeywords
+    ) {
+        $this->id = $id;
+        $this->name = $name;
+        $this->description = $description;
+        $this->text = $text;
+        $this->image = $image;
+        $this->createAt = $createAt;
+        $this->seoTitle = $seoTitle;
+        $this->seoDescription = $seoDescription;
+        $this->seoKeywords = $seoKeywords;
+    }
+
+    public function getId(): int
+    {
+        return $this->id;
+    }
+
+    public function getName(): string
+    {
+        return $this->name;
+    }
+
+    public function getDescription(): string
+    {
+        return $this->description;
+    }
+
+    public function getText(): string
+    {
+        return $this->text;
+    }
+
+    public function getImage(): File
+    {
+        return $this->image;
+    }
+
+    public function getCreateAt(): string
+    {
+        return $this->createAt;
+    }
+
+    public function getSeoTitle(): string
+    {
+        return $this->seoTitle;
+    }
+
+    public function getSeoDescription(): string
+    {
+        return $this->seoDescription;
+    }
+
+    public function getSeoKeywords(): string
+    {
+        return $this->seoKeywords;
+    }
+}
\ No newline at end of file
diff --git a/src/Model/NewsFilterVariants.php b/src/Model/NewsFilterVariants.php
new file mode 100644
index 0000000..9154ad1
--- /dev/null
+++ b/src/Model/NewsFilterVariants.php
@@ -0,0 +1,23 @@
+<?php
+
+namespace App\Model;
+
+use Doctrine\Common\Collections\Collection;
+
+class NewsFilterVariants
+{
+    /**
+     * @var Collection<NewsCategory>
+     */
+    private Collection $category;
+
+    public function __construct(Collection $category)
+    {
+        $this->category = $category;
+    }
+
+    public function getCategory(): Collection
+    {
+        return $this->category;
+    }
+}
\ No newline at end of file
diff --git a/src/Model/NewsList.php b/src/Model/NewsList.php
new file mode 100644
index 0000000..0d53703
--- /dev/null
+++ b/src/Model/NewsList.php
@@ -0,0 +1,40 @@
+<?php
+
+namespace App\Model;
+
+use Doctrine\Common\Collections\Collection;
+
+class NewsList
+{
+    private Pagination $pagination;
+    /**
+     * @var Collection<NewsListingElement>
+     */
+    private Collection $list;
+    private NewsFilterVariants $filterVariants;
+
+    public function __construct(
+        Pagination $pagination,
+        Collection $list,
+        NewsFilterVariants $filterVariants
+    ) {
+        $this->pagination = $pagination;
+        $this->list = $list;
+        $this->filterVariants = $filterVariants;
+    }
+
+    public function getPagination(): Pagination
+    {
+        return $this->pagination;
+    }
+
+    public function getList(): Collection
+    {
+        return $this->list;
+    }
+
+    public function getFilterVariants(): NewsFilterVariants
+    {
+        return $this->filterVariants;
+    }
+}
\ No newline at end of file
diff --git a/src/Model/NewsListingElement.php b/src/Model/NewsListingElement.php
new file mode 100644
index 0000000..5134307
--- /dev/null
+++ b/src/Model/NewsListingElement.php
@@ -0,0 +1,59 @@
+<?php
+
+namespace App\Model;
+
+class NewsListingElement
+{
+    private int $id;
+    private string $name;
+    private string $description;
+    private File $image;
+    private string $createAt;
+    private string $detailLink;
+
+    public function __construct(
+        int $id,
+        string $name,
+        string $description,
+        File $image,
+        string $createAt,
+        string $detailLink
+    ) {
+        $this->id = $id;
+        $this->name = $name;
+        $this->description = $description;
+        $this->image = $image;
+        $this->createAt = $createAt;
+        $this->detailLink = $detailLink;
+    }
+
+    public function getId(): int
+    {
+        return $this->id;
+    }
+
+    public function getName(): string
+    {
+        return $this->name;
+    }
+
+    public function getDescription(): string
+    {
+        return $this->description;
+    }
+
+    public function getImage(): File
+    {
+        return $this->image;
+    }
+
+    public function getCreateAt(): string
+    {
+        return $this->createAt;
+    }
+
+    public function getDetailLink(): string
+    {
+        return $this->detailLink;
+    }
+}
\ No newline at end of file
diff --git a/src/Model/Pagination.php b/src/Model/Pagination.php
new file mode 100644
index 0000000..31f1221
--- /dev/null
+++ b/src/Model/Pagination.php
@@ -0,0 +1,32 @@
+<?php
+
+namespace App\Model;
+
+class Pagination
+{
+    private int $currentPage = 1;
+    private int $pages;
+    private int $pageSize;
+
+    public function __construct(int $currentPage, int $pages, int $pageSize)
+    {
+        $this->currentPage = $currentPage;
+        $this->pages = $pages;
+        $this->pageSize = $pageSize;
+    }
+
+    public function getCurrentPage(): int
+    {
+        return $this->currentPage;
+    }
+
+    public function getPages(): int
+    {
+        return $this->pages;
+    }
+
+    public function getPageSize(): int
+    {
+        return $this->pageSize;
+    }
+}
\ No newline at end of file
diff --git a/src/Model/RestaurantDetailElement.php b/src/Model/RestaurantDetailElement.php
new file mode 100644
index 0000000..fc8bbf7
--- /dev/null
+++ b/src/Model/RestaurantDetailElement.php
@@ -0,0 +1,175 @@
+<?php
+
+namespace App\Model;
+
+use Doctrine\Common\Collections\Collection;
+
+class RestaurantDetailElement
+{
+    private int $id;
+    private string $name;
+    private string $code;
+    private string $coordinates;
+    private RestaurantType $type;
+    private string $check;
+    private string $checkInfo;
+    /**
+     * @var Collection<KitchenType>
+     */
+    private Collection $kitchen;
+    /**
+     * @var Collection<string>
+     */
+    private Collection $phone;
+    /**
+     * @var Collection<string>
+     */
+    private Collection $email;
+    /**
+     * @var Collection<string>
+     */
+    private Collection $address;
+    /**
+     * @var Collection<Tag>
+     */
+    private Collection $tags;
+    private string $site;
+    private File $image;
+    /**
+     * @var Collection<File>
+     */
+    private Collection $gallery;
+    private string $seoTitle;
+    private string $seoDescription;
+    private string $seoKeywords;
+
+    public function __construct(
+        int $id,
+        string $name,
+        string $code,
+        string $coordinates,
+        RestaurantType $type,
+        string $check,
+        string $checkInfo,
+        Collection $kitchen,
+        Collection $phone,
+        Collection $email,
+        Collection $address,
+        Collection $tags,
+        string $site,
+        File $image,
+        Collection $gallery,
+        string $seoTitle,
+        string $seoDescription,
+        string $seoKeywords
+    ) {
+        $this->id = $id;
+        $this->name = $name;
+        $this->code = $code;
+        $this->coordinates = $coordinates;
+        $this->type = $type;
+        $this->check = $check;
+        $this->checkInfo = $checkInfo;
+        $this->kitchen = $kitchen;
+        $this->phone = $phone;
+        $this->email = $email;
+        $this->address = $address;
+        $this->tags = $tags;
+        $this->site = $site;
+        $this->image = $image;
+        $this->gallery = $gallery;
+        $this->seoTitle = $seoTitle;
+        $this->seoDescription = $seoDescription;
+        $this->seoKeywords = $seoKeywords;
+    }
+
+    public function getId(): int
+    {
+        return $this->id;
+    }
+
+    public function getName(): string
+    {
+        return $this->name;
+    }
+
+    public function getCode(): string
+    {
+        return $this->code;
+    }
+
+    public function getCoordinates(): string
+    {
+        return $this->coordinates;
+    }
+
+    public function getType(): RestaurantType
+    {
+        return $this->type;
+    }
+
+    public function getCheck(): string
+    {
+        return $this->check;
+    }
+
+    public function getCheckInfo(): string
+    {
+        return $this->checkInfo;
+    }
+
+    public function getKitchen(): Collection
+    {
+        return $this->kitchen;
+    }
+
+    public function getPhone(): Collection
+    {
+        return $this->phone;
+    }
+
+    public function getEmail(): Collection
+    {
+        return $this->email;
+    }
+
+    public function getAddress(): Collection
+    {
+        return $this->address;
+    }
+
+    public function getTags(): Collection
+    {
+        return $this->tags;
+    }
+
+    public function getSite(): string
+    {
+        return $this->site;
+    }
+
+    public function getImage(): File
+    {
+        return $this->image;
+    }
+
+    public function getGallery(): Collection
+    {
+        return $this->gallery;
+    }
+
+    public function getSeoTitle(): string
+    {
+        return $this->seoTitle;
+    }
+
+    public function getSeoDescription(): string
+    {
+        return $this->seoDescription;
+    }
+
+    public function getSeoKeywords(): string
+    {
+        return $this->seoKeywords;
+    }
+}
\ No newline at end of file
diff --git a/src/Model/RestaurantFilterVariants.php b/src/Model/RestaurantFilterVariants.php
new file mode 100644
index 0000000..04d31d0
--- /dev/null
+++ b/src/Model/RestaurantFilterVariants.php
@@ -0,0 +1,33 @@
+<?php
+
+namespace App\Model;
+
+use Doctrine\Common\Collections\Collection;
+
+class RestaurantFilterVariants
+{
+    /**
+     * @var Collection<RestaurantType>
+     */
+    private Collection $type;
+    /**
+     * @var Collection<KitchenType>
+     */
+    private Collection $kitchen;
+
+    public function __construct(Collection $type, Collection $kitchen)
+    {
+        $this->type = $type;
+        $this->kitchen = $kitchen;
+    }
+
+    public function getType(): Collection
+    {
+        return $this->type;
+    }
+
+    public function getKitchen(): Collection
+    {
+        return $this->kitchen;
+    }
+}
\ No newline at end of file
diff --git a/src/Model/RestaurantList.php b/src/Model/RestaurantList.php
new file mode 100644
index 0000000..28a6630
--- /dev/null
+++ b/src/Model/RestaurantList.php
@@ -0,0 +1,40 @@
+<?php
+
+namespace App\Model;
+
+use Doctrine\Common\Collections\Collection;
+
+class RestaurantList
+{
+    private Pagination $pagination;
+    /**
+     * @var Collection<RestaurantListingElement>
+     */
+    private Collection $list;
+    private RestaurantFilterVariants $filterVariants;
+
+    public function __construct(
+        Pagination $pagination,
+        Collection $list,
+        RestaurantFilterVariants $filterVariants
+    ) {
+        $this->pagination = $pagination;
+        $this->list = $list;
+        $this->filterVariants = $filterVariants;
+    }
+
+    public function getPagination(): Pagination
+    {
+        return $this->pagination;
+    }
+
+    public function getList(): Collection
+    {
+        return $this->list;
+    }
+
+    public function getFilterVariants(): RestaurantFilterVariants
+    {
+        return $this->filterVariants;
+    }
+}
\ No newline at end of file
diff --git a/src/Model/RestaurantListingElement.php b/src/Model/RestaurantListingElement.php
new file mode 100644
index 0000000..6aeb904
--- /dev/null
+++ b/src/Model/RestaurantListingElement.php
@@ -0,0 +1,67 @@
+<?php
+
+namespace App\Model;
+
+class RestaurantListingElement
+{
+    private int $id;
+    private string $name;
+    private string $code;
+    private RestaurantType $type;
+    private string $check;
+    private File $image;
+    private string $detailLink;
+
+    public function __construct(
+        int $id,
+        string $name,
+        string $code,
+        RestaurantType $type,
+        string $check,
+        File $image,
+        string $detailLink
+    ) {
+        $this->id = $id;
+        $this->name = $name;
+        $this->code = $code;
+        $this->type = $type;
+        $this->check = $check;
+        $this->image = $image;
+        $this->detailLink = $detailLink;
+    }
+
+    public function getId(): int
+    {
+        return $this->id;
+    }
+
+    public function getName(): string
+    {
+        return $this->name;
+    }
+
+    public function getCode(): string
+    {
+        return $this->code;
+    }
+
+    public function getType(): RestaurantType
+    {
+        return $this->type;
+    }
+
+    public function getCheck(): string
+    {
+        return $this->check;
+    }
+
+    public function getImage(): File
+    {
+        return $this->image;
+    }
+
+    public function getDetailLink(): string
+    {
+        return $this->detailLink;
+    }
+}
\ No newline at end of file
diff --git a/src/Model/RestaurantType.php b/src/Model/RestaurantType.php
new file mode 100644
index 0000000..a10325b
--- /dev/null
+++ b/src/Model/RestaurantType.php
@@ -0,0 +1,32 @@
+<?php
+
+namespace App\Model;
+
+class RestaurantType
+{
+    private int $id;
+    private string $name;
+    private string $code;
+
+    public function __construct(int $id, string $name, string $code)
+    {
+        $this->id = $id;
+        $this->name = $name;
+        $this->code = $code;
+    }
+
+    public function getId(): int
+    {
+        return $this->id;
+    }
+
+    public function getName(): string
+    {
+        return $this->name;
+    }
+
+    public function getCode(): string
+    {
+        return $this->code;
+    }
+}
\ No newline at end of file
diff --git a/src/Model/Review.php b/src/Model/Review.php
new file mode 100644
index 0000000..3af98fd
--- /dev/null
+++ b/src/Model/Review.php
@@ -0,0 +1,53 @@
+<?php
+
+namespace App\Model;
+
+use DateTime;
+
+class Review
+{
+    private int $id;
+    private DateTime $date;
+    private int $score;
+    private string $text;
+    private string $userName;
+
+    public function __construct(
+        int $id,
+        DateTime $date,
+        int $score,
+        string $text,
+        string $userName
+    ) {
+        $this->id = $id;
+        $this->date = $date;
+        $this->score = $score;
+        $this->text = $text;
+        $this->userName = $userName;
+    }
+
+    public function getId(): int
+    {
+        return $this->id;
+    }
+
+    public function getDate(): DateTime
+    {
+        return $this->date;
+    }
+
+    public function getScore(): int
+    {
+        return $this->score;
+    }
+
+    public function getText(): string
+    {
+        return $this->text;
+    }
+
+    public function getUserName(): string
+    {
+        return $this->userName;
+    }
+}
\ No newline at end of file
diff --git a/src/Model/Tag.php b/src/Model/Tag.php
new file mode 100644
index 0000000..5c2d1cf
--- /dev/null
+++ b/src/Model/Tag.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace App\Model;
+
+use phpDocumentor\Reflection\Types\Collection;
+
+class Tag
+{
+    private string $name;
+    /**
+     * @var Collection<string>
+     */
+    private Collection $list;
+
+    public function __construct(string $name, Collection $list)
+    {
+        $this->name = $name;
+        $this->list = $list;
+    }
+
+    public function getName(): string
+    {
+        return $this->name;
+    }
+
+    public function getList(): Collection
+    {
+        return $this->list;
+    }
+}
\ No newline at end of file
-- 
GitLab