Skip to content

Commit bb3fd67

Browse files
committed
feat: OrderResponseDto에 예시용 of 메서드 추가
1 parent 538a9cb commit bb3fd67

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/api/order/dto/response/order-response.dto.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,18 @@ export class OrderResponseDto {
3737
),
3838
);
3939
}
40+
41+
/*
42+
static of(order: Order): OrderResponseDto {
43+
const response = new OrderResponseDto();
44+
response.id = order.id;
45+
response.totalPrice = order.totalPrice;
46+
response.registeredDateTime = order.registeredDateTime;
47+
response.products = order.orderProducts.map((orderProduct) =>
48+
ProductResponseDto.of(orderProduct.product),
49+
);
50+
51+
return response;
52+
}
53+
*/
4054
}

0 commit comments

Comments
 (0)