feat: add Restaurant DTO and remove prisma generate from the build script
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@
|
||||
"private": true,
|
||||
"license": "UNLICENSED",
|
||||
"scripts": {
|
||||
"build": "prisma generate && nest build",
|
||||
"build": "nest build",
|
||||
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
||||
"start": "nest start",
|
||||
"start:dev": "nest start --watch",
|
||||
|
||||
@@ -6,6 +6,7 @@ export class RestaurantDto {
|
||||
slug: string;
|
||||
description?: string;
|
||||
logo?: string;
|
||||
template?: string;
|
||||
categories?: CategoryDto[];
|
||||
createdAt?: Date;
|
||||
|
||||
@@ -16,6 +17,7 @@ export class RestaurantDto {
|
||||
slug: entity.slug,
|
||||
description: entity.description ?? undefined,
|
||||
logo: entity.logo ?? undefined,
|
||||
template: entity.template ?? undefined,
|
||||
categories: entity.categories?.map(CategoryDto.fromEntity) ?? [],
|
||||
createdAt: entity.createdAt ? new Date(entity.createdAt) : undefined,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user