first commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { MenuItemDto } from "src/item/dto/menu-item.dto";
|
||||
|
||||
export class CategoryDto {
|
||||
id: string;
|
||||
name: string;
|
||||
restaurantId: string;
|
||||
items?: MenuItemDto[];
|
||||
|
||||
static fromEntity(entity: any): CategoryDto {
|
||||
return {
|
||||
id: entity.id,
|
||||
name: entity.name,
|
||||
restaurantId: entity.restaurantId,
|
||||
items: entity.items?.map(MenuItemDto.fromEntity) ?? [],
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user