Skip to content

Commit

Permalink
[feat] OrderDTO 수정
Browse files Browse the repository at this point in the history
- requestID(customer_id) 와 StoreID 추가
  • Loading branch information
kimhyun5u committed Aug 17, 2024
1 parent f72d9b7 commit 6be0374
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/camp/woowak/lab/order/service/dto/OrderDTO.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package camp.woowak.lab.order.service.dto;

import java.util.List;
import java.util.UUID;

import camp.woowak.lab.customer.domain.Customer;
import camp.woowak.lab.order.domain.Order;
Expand Down Expand Up @@ -31,11 +32,13 @@ public OrderDTO(Order order) {

@Getter
public static class RequesterDTO {
private final UUID id;
private final String name;
private final String email;
private final String phone;

public RequesterDTO(Customer customer) {
this.id = customer.getId();
this.name = customer.getName();
this.email = customer.getEmail();
this.phone = customer.getPhone();
Expand All @@ -59,12 +62,14 @@ public OrderItemDTO(OrderItem orderItem) {

@Getter
public static class StoreDTO {
private final Long id;
private final String name;
private final String ownerName;
private final String address;
private final String phoneNumber;

public StoreDTO(Store store) {
this.id = store.getId();
this.name = store.getName();
this.ownerName = store.getOwner().getName();
this.address = store.getStoreAddress().getDistrict();
Expand Down

0 comments on commit 6be0374

Please sign in to comment.