diff --git a/api/src/main/java/moa/funding/query/response/FundingDetailResponse.java b/api/src/main/java/moa/funding/query/response/FundingDetailResponse.java index 05f006f..1102d48 100644 --- a/api/src/main/java/moa/funding/query/response/FundingDetailResponse.java +++ b/api/src/main/java/moa/funding/query/response/FundingDetailResponse.java @@ -96,7 +96,7 @@ private static Participant of( Member member, List friends ) { - if (participant.getFundingMessage().getVisible() == PRIVATE + if (participant.getFundingMessage().getVisibility() == PRIVATE && !isFundingOwner(funding, member) && !isMessageOwner(participant, member)) { return new Participant( null, @@ -119,7 +119,7 @@ private static Participant getParticipant(FundingParticipant participant, List friends) { Funding funding = participant.getFunding(); diff --git a/api/src/main/java/moa/funding/request/FundingMessageUpdateRequest.java b/api/src/main/java/moa/funding/request/FundingMessageUpdateRequest.java index 2afeb7d..d00f965 100644 --- a/api/src/main/java/moa/funding/request/FundingMessageUpdateRequest.java +++ b/api/src/main/java/moa/funding/request/FundingMessageUpdateRequest.java @@ -11,14 +11,14 @@ public record FundingMessageUpdateRequest( @NotBlank String message, @Schema(example = "메시지 공개 여부") - @NotNull MessageVisibility visible + @NotNull MessageVisibility visibility ) { public FundingMessageUpdateCommand toCommand(Long memberId, Long messageId) { return new FundingMessageUpdateCommand( memberId, messageId, message, - visible + visibility ); } } diff --git a/api/src/main/java/moa/funding/request/FundingParticipateRequest.java b/api/src/main/java/moa/funding/request/FundingParticipateRequest.java index 08f2781..d2f2ec5 100644 --- a/api/src/main/java/moa/funding/request/FundingParticipateRequest.java +++ b/api/src/main/java/moa/funding/request/FundingParticipateRequest.java @@ -14,7 +14,7 @@ public record FundingParticipateRequest( @NotBlank String message, @Schema(example = "메시지 공개 여부") - @NotNull MessageVisibility visible + @NotNull MessageVisibility visibility ) { public FundingParticipateCommand toCommand(Long fundingId, Long memberId) { return new FundingParticipateCommand( @@ -22,7 +22,7 @@ public FundingParticipateCommand toCommand(Long fundingId, Long memberId) { memberId, paymentOrderId, message, - visible + visibility ); } } diff --git a/api/src/main/java/moa/global/exception/ExceptionControllerAdvice.java b/api/src/main/java/moa/global/exception/ExceptionControllerAdvice.java index 5f97000..b44a57f 100644 --- a/api/src/main/java/moa/global/exception/ExceptionControllerAdvice.java +++ b/api/src/main/java/moa/global/exception/ExceptionControllerAdvice.java @@ -53,7 +53,7 @@ protected ResponseEntity handleExceptionInternal( log.error("예외가 발생했습니다. uri: {} {}, ", request.getMethod(), request.getRequestURI(), ex); requestLogging(request); return ResponseEntity.status(statusCode) - .body(new ExceptionResponse("DEFAULT", body.toString())); + .body(new ExceptionResponse("DEFAULT", ex.getMessage())); } private void requestLogging(HttpServletRequest request) { diff --git a/core/src/main/java/moa/funding/domain/Funding.java b/core/src/main/java/moa/funding/domain/Funding.java index 9aa7a16..918d85e 100644 --- a/core/src/main/java/moa/funding/domain/Funding.java +++ b/core/src/main/java/moa/funding/domain/Funding.java @@ -75,7 +75,7 @@ public class Funding extends RootEntity { @Enumerated(STRING) @Column(nullable = false) - private FundingVisibility visible; + private FundingVisibility visibility; @Enumerated(STRING) @Column(nullable = false) @@ -120,7 +120,7 @@ public Funding( String title, String description, LocalDate endDate, - FundingVisibility visible, + FundingVisibility visibility, Price maximumAmount, Member member, Product product, @@ -131,7 +131,7 @@ public Funding( this.title = title; this.description = description; this.endDate = endDate; - this.visible = visible; + this.visibility = visibility; this.status = PROCESSING; this.maximumAmount = maximumAmount; this.minimumAmount = MINIMUM_AMOUNT; diff --git a/core/src/main/java/moa/funding/domain/FundingMessage.java b/core/src/main/java/moa/funding/domain/FundingMessage.java index aaa17b3..b0f7bd1 100644 --- a/core/src/main/java/moa/funding/domain/FundingMessage.java +++ b/core/src/main/java/moa/funding/domain/FundingMessage.java @@ -41,13 +41,13 @@ public class FundingMessage extends RootEntity { @Enumerated(STRING) @Column(nullable = false) - private MessageVisibility visible; + private MessageVisibility visibility; - public FundingMessage(Member sender, Member receiver, String content, MessageVisibility visible) { + public FundingMessage(Member sender, Member receiver, String content, MessageVisibility visibility) { this.sender = sender; this.receiver = receiver; this.content = content; - this.visible = visible; + this.visibility = visibility; } public void validateSender(Member member) { @@ -58,6 +58,6 @@ public void validateSender(Member member) { public void update(String content, MessageVisibility visible) { this.content = content; - this.visible = visible; + this.visibility = visible; } } diff --git a/core/src/main/resources/db/migration/dev/V1__init_domain.sql b/core/src/main/resources/db/migration/dev/V1__init_domain.sql index 4db73fd..376d1b1 100644 --- a/core/src/main/resources/db/migration/dev/V1__init_domain.sql +++ b/core/src/main/resources/db/migration/dev/V1__init_domain.sql @@ -137,7 +137,7 @@ create table product_option create table funding ( id bigint auto_increment primary key, - visible varchar(255) not null, + visibility varchar(255) not null, title varchar(25) not null, description text not null, end_date date not null, @@ -170,7 +170,7 @@ create table funding_message member_from_id bigint not null, member_to_id bigint not null, content varchar(255) not null, - visible varchar(255) not null, + visibility varchar(255) not null, created_date datetime(6) not null, updated_date datetime(6), constraint FK_funding_message_from_member diff --git a/core/src/main/resources/db/migration/local/V1__init_domain.sql b/core/src/main/resources/db/migration/local/V1__init_domain.sql index be42d21..4f352e1 100644 --- a/core/src/main/resources/db/migration/local/V1__init_domain.sql +++ b/core/src/main/resources/db/migration/local/V1__init_domain.sql @@ -137,7 +137,7 @@ create table if not exists product_option create table if not exists funding ( id bigint auto_increment primary key, - visible varchar(255) not null, + visibility varchar(255) not null, title varchar(25) not null, description text, end_date date not null, @@ -170,7 +170,7 @@ create table if not exists funding_message member_from_id bigint not null, member_to_id bigint not null, content varchar(255) not null, - visible varchar(255) not null, + visibility varchar(255) not null, created_date datetime(6) not null, updated_date datetime(6), constraint FK_funding_message_from_member diff --git a/core/src/main/resources/db/migration/prod/V1__init_domain.sql b/core/src/main/resources/db/migration/prod/V1__init_domain.sql index 4db73fd..376d1b1 100644 --- a/core/src/main/resources/db/migration/prod/V1__init_domain.sql +++ b/core/src/main/resources/db/migration/prod/V1__init_domain.sql @@ -137,7 +137,7 @@ create table product_option create table funding ( id bigint auto_increment primary key, - visible varchar(255) not null, + visibility varchar(255) not null, title varchar(25) not null, description text not null, end_date date not null, @@ -170,7 +170,7 @@ create table funding_message member_from_id bigint not null, member_to_id bigint not null, content varchar(255) not null, - visible varchar(255) not null, + visibility varchar(255) not null, created_date datetime(6) not null, updated_date datetime(6), constraint FK_funding_message_from_member