feat: add Restaurant DTO with properties and a static fromEntity method for data conversion.

This commit is contained in:
SamiGetu
2025-12-05 10:31:07 +03:00
parent 08404eb145
commit 5dc5cd87a8
+2
View File
@@ -6,6 +6,7 @@ export class RestaurantDto {
slug: string;
description?: string;
logo?: string;
banner?: string;
template?: string;
categories?: CategoryDto[];
createdAt?: Date;
@@ -17,6 +18,7 @@ export class RestaurantDto {
slug: entity.slug,
description: entity.description ?? undefined,
logo: entity.logo ?? undefined,
banner: entity.banner ?? undefined,
template: entity.template ?? undefined,
categories: entity.categories?.map(CategoryDto.fromEntity) ?? [],
createdAt: entity.createdAt ? new Date(entity.createdAt) : undefined,