diff --git a/src/Model/File.php b/src/Model/File.php new file mode 100644 index 0000000000000000000000000000000000000000..2cbf0a71e20aa0dd76075442038614a2ac3b98cf --- /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 0000000000000000000000000000000000000000..b9d532bc5f6404c77c481ca3a623ecb2ce1e1517 --- /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 0000000000000000000000000000000000000000..ba1e1a532f8111b97e6f12f6d8a7a4c12a009a65 --- /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 0000000000000000000000000000000000000000..99b345397ff607068894f8315302c752d65c1818 --- /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 0000000000000000000000000000000000000000..9154ad1cd11410ebaffd2338778c6142d5d5212c --- /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 0000000000000000000000000000000000000000..0d537032e70730ccb2c8f1668a5e8080beccb56b --- /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 0000000000000000000000000000000000000000..5134307b16becb13280f8bea38698b15f0def6f7 --- /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 0000000000000000000000000000000000000000..31f1221e58b7cd195478cec5fa38c5c279d8246b --- /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 0000000000000000000000000000000000000000..fc8bbf7378e3588bb51ddca4726205715a9b43a9 --- /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 0000000000000000000000000000000000000000..04d31d0aff6aaac6bdd5904f0feedf92a28df790 --- /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 0000000000000000000000000000000000000000..28a6630676d90dab4318f6df0dc834d68bec6f88 --- /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 0000000000000000000000000000000000000000..6aeb904f1cf4d61257c4b3a4d4c88b5096fa07c2 --- /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 0000000000000000000000000000000000000000..a10325b4d35a279b9abb972ac2df62259b93b4df --- /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 0000000000000000000000000000000000000000..3af98fd0038a6113afcbe49353533b71c42f96da --- /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 0000000000000000000000000000000000000000..5c2d1cf9672e76007805237218ffb89babc00460 --- /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