Skip to content

Commit 83f169b

Browse files
committed
feature: 물품 최근 입고일, 생성일 필드 추가
1 parent d7b1938 commit 83f169b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/com/nexerp/domain/item/model/response/ItemSearchResponse.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.nexerp.domain.item.model.response;
22

33
import com.nexerp.domain.item.model.entity.Item;
4+
import java.time.LocalDate;
45
import lombok.Builder;
56
import lombok.Getter;
67

@@ -14,15 +15,19 @@ public class ItemSearchResponse {
1415
private final Long quantity;
1516
private final String location;
1617
private final Long price;
18+
private final LocalDate receivedAt;
19+
private final LocalDate createdAt;
1720

18-
public static ItemSearchResponse from (Item i) {
21+
public static ItemSearchResponse from(Item i) {
1922
return ItemSearchResponse.builder()
2023
.itemId(i.getId())
2124
.code(i.getCode())
2225
.name(i.getName())
2326
.quantity(i.getQuantity())
2427
.location(i.getLocation())
2528
.price(i.getPrice())
29+
.receivedAt(i.getReceivedAt().toLocalDate())
30+
.createdAt(i.getCreatedAt().toLocalDate())
2631
.build();
2732
}
2833
}

0 commit comments

Comments
 (0)