feat: Add CategoryDto with properties and a static fromEntity conversion method.

This commit is contained in:
2025-11-29 16:18:41 +03:00
parent ea833c6bd0
commit 365dd603db
+2
View File
@@ -3,6 +3,7 @@ import { MenuItemDto } from "src/item/dto/menu-item.dto";
export class CategoryDto {
id: string;
name: string;
image: string;
restaurantId: string;
items?: MenuItemDto[];
@@ -10,6 +11,7 @@ export class CategoryDto {
return {
id: entity.id,
name: entity.name,
image: entity.image,
restaurantId: entity.restaurantId,
items: entity.items?.map(MenuItemDto.fromEntity) ?? [],
};