feat: Implement menu item and category management with Redis caching for restaurant data.

This commit is contained in:
2025-12-11 09:54:52 +03:00
parent 5dc5cd87a8
commit 1bc01337fc
19 changed files with 467 additions and 29 deletions
+3
View File
@@ -1,4 +1,5 @@
import { MenuItemDto } from "src/item/dto/menu-item.dto";
import { RestaurantDto } from "src/restaurant/dto/restaurant.dto";
export class CategoryDto {
id: string;
@@ -6,6 +7,7 @@ export class CategoryDto {
image: string;
restaurantId: string;
items?: MenuItemDto[];
restaurant?: RestaurantDto;
static fromEntity(entity: any): CategoryDto {
return {
@@ -14,6 +16,7 @@ export class CategoryDto {
image: entity.image,
restaurantId: entity.restaurantId,
items: entity.items?.map(MenuItemDto.fromEntity) ?? [],
restaurant: entity.restaurant ? RestaurantDto.fromEntity(entity.restaurant) : undefined,
};
}
}