Skip to content

Commit

Permalink
feat: 테이스팅 노트 수정/삭제 공개여부 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
swa07016 committed Aug 27, 2024
1 parent e74b93b commit 618e959
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ public TastingNote CreateTastingNote(TastingNoteRequest.CreateTastingNoteDTO req
.buyAgain(request.getBuyAgain())
.starRating(request.getRating())
.isDeleted(false)
.isPublic(request.getIsPublic())
.build();
}

Expand Down Expand Up @@ -419,5 +420,7 @@ public void updateTastingNote(TastingNote tastingNote, TastingNoteRequest.Update
tastingNote.setFinish(request.getFinish());
tastingNote.setColor(request.getColor());
tastingNote.setVintage(request.getVintage());
Boolean isPublic = request.getIsPublic();
if(isPublic != null) tastingNote.setIsPublic(request.getIsPublic());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import lombok.*;
import org.springframework.web.multipart.MultipartFile;

import javax.persistence.Column;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
Expand Down Expand Up @@ -83,6 +84,9 @@ public static class CreateTastingNoteDTO {

private List<SmellKeyword> smellKeywordList;

@Schema(name = "isPublic", description = "공개여부", required = false)
private Boolean isPublic = Boolean.FALSE;

public Boolean getBuyAgain() {
return buyAgain;
}
Expand Down Expand Up @@ -165,6 +169,9 @@ public static class UpdateTastingNoteDTO {
@Schema(name = "deleteImgLists 삭제사항 있을 경우 작성해주세요",description = "테이스팅 노트 이미지 리스트", required = false)
private List<Long> deleteImgList;

@Schema(name = "isPublic", description = "공개여부", required = false)
private Boolean isPublic;

public Boolean getBuyAgain() {
return buyAgain;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ public class QTastingNote extends EntityPathBase<TastingNote> {

public final BooleanPath isDeleted = createBoolean("isDeleted");

public final BooleanPath isPublic = createBoolean("isPublic");

public final StringPath memo = createString("memo");

public final NumberPath<Double> officialAlcohol = createNumber("officialAlcohol", Double.class);
Expand Down

0 comments on commit 618e959

Please sign in to comment.