From 11736e44bd06286ed2fe9a91df220abf9d4573ee Mon Sep 17 00:00:00 2001 From: hyxklee Date: Tue, 14 Jan 2025 10:15:12 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=82=AC=EC=9A=A9=EC=B2=98=20=EC=BB=AC?= =?UTF-8?q?=EB=9F=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../account/application/dto/ReceiptDTO.java | 22 ++++++++++++------- .../domain/account/domain/entity/Receipt.java | 3 +++ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/main/java/leets/weeth/domain/account/application/dto/ReceiptDTO.java b/src/main/java/leets/weeth/domain/account/application/dto/ReceiptDTO.java index bf1b33c1..1576781d 100644 --- a/src/main/java/leets/weeth/domain/account/application/dto/ReceiptDTO.java +++ b/src/main/java/leets/weeth/domain/account/application/dto/ReceiptDTO.java @@ -11,26 +11,32 @@ public class ReceiptDTO { public record Response( - Long id, - String description, - Integer amount, - LocalDate date, - List fileUrls - ) {} + Long id, + String description, + String source, + Integer amount, + LocalDate date, + List fileUrls + ) { + } public record Save( String description, + String source, @NotNull Integer amount, @NotNull LocalDate date, @NotNull Integer cardinal, @Valid List<@NotNull FileSaveRequest> files - ) {} + ) { + } public record Update( String description, + String source, @NotNull Integer amount, @NotNull LocalDate date, @NotNull Integer cardinal, @Valid List<@NotNull FileSaveRequest> files - ) {} + ) { + } } diff --git a/src/main/java/leets/weeth/domain/account/domain/entity/Receipt.java b/src/main/java/leets/weeth/domain/account/domain/entity/Receipt.java index 1569b638..6ddb96ae 100644 --- a/src/main/java/leets/weeth/domain/account/domain/entity/Receipt.java +++ b/src/main/java/leets/weeth/domain/account/domain/entity/Receipt.java @@ -27,6 +27,8 @@ public class Receipt extends BaseEntity { private String description; + private String source; + private Integer amount; private LocalDate date; @@ -37,6 +39,7 @@ public class Receipt extends BaseEntity { public void update(ReceiptDTO.Update dto){ this.description = dto.description(); + this.source = dto.source(); this.amount = dto.amount(); this.date = dto.date(); }