diff --git a/src/main/java/timify/com/study/StudyConverter.java b/src/main/java/timify/com/study/StudyConverter.java index b3814df..f7fc15c 100644 --- a/src/main/java/timify/com/study/StudyConverter.java +++ b/src/main/java/timify/com/study/StudyConverter.java @@ -7,51 +7,58 @@ import timify.com.study.dto.StudyResponse; public class StudyConverter { + public static StudyType toStudyType(String title, int order) { return StudyType.builder() - .title(title) - .orderNum(order) - .status(CategoryStatus.ACTIVE) - .build(); + .title(title) + .orderNum(order) + .status(CategoryStatus.ACTIVE) + .isDefault(false) + .build(); } public static StudyResponse.studyTypeDto toStudyTypeDto(StudyType studyType) { return StudyResponse.studyTypeDto.builder() - .studyTypeId(studyType.getId()) - .order(studyType.getOrderNum()) - .studyTypeTitle(studyType.getTitle()) - .build(); + .studyTypeId(studyType.getId()) + .order(studyType.getOrderNum()) + .studyTypeTitle(studyType.getTitle()) + .isDefault(studyType.isDefault()) + .build(); } public static StudyMethod toStudyMethod(String title, int order) { return StudyMethod.builder() - .title(title) - .orderNum(order) - .status(CategoryStatus.ACTIVE) - .build(); + .title(title) + .orderNum(order) + .status(CategoryStatus.ACTIVE) + .isDefault(false) + .build(); } public static StudyResponse.studyMethodDto toStudyMethodDto(StudyMethod studyMethod) { return StudyResponse.studyMethodDto.builder() - .studyMethodId(studyMethod.getId()) - .order(studyMethod.getOrderNum()) - .studyMethodTitle(studyMethod.getTitle()) - .build(); + .studyMethodId(studyMethod.getId()) + .order(studyMethod.getOrderNum()) + .studyMethodTitle(studyMethod.getTitle()) + .isDefault(studyMethod.isDefault()) + .build(); } public static StudyPlace toStudyPlace(String title, int order) { return StudyPlace.builder() - .title(title) - .orderNum(order) - .status(CategoryStatus.ACTIVE) - .build(); + .title(title) + .orderNum(order) + .status(CategoryStatus.ACTIVE) + .isDefault(false) + .build(); } public static StudyResponse.studyPlaceDto toStudyPlaceDto(StudyPlace studyPlace) { return StudyResponse.studyPlaceDto.builder() - .studyPlaceId(studyPlace.getId()) - .order(studyPlace.getOrderNum()) - .studyPlaceTitle(studyPlace.getTitle()) - .build(); + .studyPlaceId(studyPlace.getId()) + .order(studyPlace.getOrderNum()) + .studyPlaceTitle(studyPlace.getTitle()) + .isDefault(studyPlace.isDefault()) + .build(); } } diff --git a/src/main/java/timify/com/study/StudyService.java b/src/main/java/timify/com/study/StudyService.java index 5d9d9d1..5d7905c 100644 --- a/src/main/java/timify/com/study/StudyService.java +++ b/src/main/java/timify/com/study/StudyService.java @@ -1,5 +1,7 @@ package timify.com.study; +import java.util.List; +import java.util.stream.Collectors; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -15,8 +17,6 @@ import timify.com.study.repository.StudyPlaceRepository; import timify.com.study.repository.StudyTypeRepository; -import java.util.List; - @Service @RequiredArgsConstructor public class StudyService { @@ -37,13 +37,15 @@ public StudyType insertStudyType(StudyRequest.studyTypeRequest request, Member m } // 이미 존재하는 이름의 StudyType인지 검증 - boolean exists = studyTypeRepository.existsByMemberAndTitleAndStatus(member, request.getTitle(), CategoryStatus.ACTIVE); + boolean exists = studyTypeRepository.existsByMemberAndTitleAndStatus(member, + request.getTitle(), CategoryStatus.ACTIVE); if (exists) { throw new StudyHandler(ErrorStatus.STUDY_TYPE_ALREADY_EXISTS); } // StudyType 엔티티 생성 및 연관관계 매핑 - StudyType studyType = StudyConverter.toStudyType(request.getTitle(), member.getStudyTypeList().size() + 1); + StudyType studyType = StudyConverter.toStudyType(request.getTitle(), + member.getStudyTypeList().size() + 1); studyType.setMember(member); return studyTypeRepository.save(studyType); @@ -55,31 +57,52 @@ public List getStudyTypes(Member member) { } @Transactional - public StudyType updateStudyType(StudyRequest.studyTypeRequest request, Long studyTypeId, Member member) { - StudyType studyType = studyTypeRepository.findByIdAndStatus(studyTypeId, CategoryStatus.ACTIVE) - .orElseThrow(() -> new StudyHandler(ErrorStatus.STUDY_TYPE_NOT_FOUND)); + public StudyType updateStudyType(StudyRequest.studyTypeRequest request, Long studyTypeId, + Member member) { + StudyType studyType = studyTypeRepository.findByIdAndStatus(studyTypeId, + CategoryStatus.ACTIVE) + .orElseThrow(() -> new StudyHandler(ErrorStatus.STUDY_TYPE_NOT_FOUND)); // 해당 studyType이 member의 것이 맞는지 검증 if (!studyType.getMember().equals(member)) { throw new StudyHandler(ErrorStatus.NOT_STUDY_TYPE_OWNER); } - // 활성화된 공부 분류와의 이름 중복 여부 검증 - boolean exists = studyTypeRepository.existsByMemberAndTitleAndStatus(member, request.getTitle(), CategoryStatus.ACTIVE); - if (exists) { - throw new StudyHandler(ErrorStatus.STUDY_TYPE_ALREADY_EXISTS); + // title을 수정하는 경우 + if (request.getTitle() != null) { + // 활성화된 공부 분류와의 이름 중복 여부 검증 + boolean exists = studyTypeRepository.existsByMemberAndTitleAndStatus(member, + request.getTitle(), CategoryStatus.ACTIVE); + if (exists) { + throw new StudyHandler(ErrorStatus.STUDY_TYPE_ALREADY_EXISTS); + } + + // studyType의 이름 수정 + studyType.setTitle(request.getTitle()); } - // studyType의 이름 수정 - studyType.setTitle(request.getTitle()); + // default 여부를 수정하는 경우 + if (request.getIsDefault() != null) { + List defaultStudyType = member.getStudyTypeList().stream() + .filter(StudyType::isDefault).collect(Collectors.toList()); + if (!defaultStudyType.isEmpty()) { // 기존 default 값이 존재하는 경우 + + // 기존 default 값 해제 + defaultStudyType.get(0).updateIsDefault(false); + + // 요청한 studyType을 default true로 변경 + studyType.updateIsDefault(true); + } + } return studyType; } @Transactional public void deleteStudyType(Long studyTypeId, Member member) { - StudyType studyType = studyTypeRepository.findByIdAndStatus(studyTypeId, CategoryStatus.ACTIVE) - .orElseThrow(() -> new StudyHandler(ErrorStatus.STUDY_TYPE_NOT_FOUND)); + StudyType studyType = studyTypeRepository.findByIdAndStatus(studyTypeId, + CategoryStatus.ACTIVE) + .orElseThrow(() -> new StudyHandler(ErrorStatus.STUDY_TYPE_NOT_FOUND)); // 해당 studyType이 member의 것이 맞는지 검증 if (!studyType.getMember().equals(member)) { @@ -98,13 +121,15 @@ public StudyMethod insertStudyMethod(StudyRequest.studyMethodRequest request, Me } // 이미 존재하는 이름의 StudyMethod인지 검증 - boolean exists = studyMethodRepository.existsByMemberAndTitleAndStatus(member, request.getTitle(), CategoryStatus.ACTIVE); + boolean exists = studyMethodRepository.existsByMemberAndTitleAndStatus(member, + request.getTitle(), CategoryStatus.ACTIVE); if (exists) { throw new StudyHandler(ErrorStatus.STUDY_METHOD_ALREADY_EXISTS); } // StudyMethod 엔티티 생성 및 연관관계 매핑 - StudyMethod studyMethod = StudyConverter.toStudyMethod(request.getTitle(), member.getStudyMethodList().size() + 1); + StudyMethod studyMethod = StudyConverter.toStudyMethod(request.getTitle(), + member.getStudyMethodList().size() + 1); studyMethod.setMember(member); return studyMethodRepository.save(studyMethod); @@ -116,31 +141,52 @@ public List getStudyMethods(Member member) { } @Transactional - public StudyMethod updateStudyMethod(StudyRequest.studyMethodRequest request, Long studyMethodId, Member member) { - StudyMethod studyMethod = studyMethodRepository.findByIdAndStatus(studyMethodId, CategoryStatus.ACTIVE) - .orElseThrow(() -> new StudyHandler(ErrorStatus.STUDY_METHOD_NOT_FOUND)); + public StudyMethod updateStudyMethod(StudyRequest.studyMethodRequest request, + Long studyMethodId, Member member) { + StudyMethod studyMethod = studyMethodRepository.findByIdAndStatus(studyMethodId, + CategoryStatus.ACTIVE) + .orElseThrow(() -> new StudyHandler(ErrorStatus.STUDY_METHOD_NOT_FOUND)); // 해당 studyMethod가 member의 것이 맞는지 검증 if (!studyMethod.getMember().equals(member)) { throw new StudyHandler(ErrorStatus.NOT_STUDY_METHOD_OWNER); } - // 활성화된 공부 방법과의 이름 중복 여부 검증 - boolean exists = studyMethodRepository.existsByMemberAndTitleAndStatus(member, request.getTitle(), CategoryStatus.ACTIVE); - if (exists) { - throw new StudyHandler(ErrorStatus.STUDY_METHOD_ALREADY_EXISTS); + // title을 수정하는 경우 + if (request.getTitle() != null) { + // 활성화된 공부 방법과의 이름 중복 여부 검증 + boolean exists = studyMethodRepository.existsByMemberAndTitleAndStatus(member, + request.getTitle(), CategoryStatus.ACTIVE); + if (exists) { + throw new StudyHandler(ErrorStatus.STUDY_METHOD_ALREADY_EXISTS); + } + + // studyMethod의 이름 수정 + studyMethod.setTitle(request.getTitle()); } - // studyMethod의 이름 수정 - studyMethod.setTitle(request.getTitle()); + // default 여부를 수정하는 경우 + if (request.getIsDefault() != null) { + List defaultStudyMethod = member.getStudyMethodList().stream() + .filter(StudyMethod::isDefault).collect(Collectors.toList()); + if (!defaultStudyMethod.isEmpty()) { // 기존 default 값이 존재하는 경우 + + // 기존 default 값 해제 + defaultStudyMethod.get(0).updateIsDefault(false); + + // 요청한 studyMethod를 default true로 변경 + studyMethod.updateIsDefault(true); + } + } return studyMethod; } @Transactional public void deleteStudyMethod(Long studyMethodId, Member member) { - StudyMethod studyMethod = studyMethodRepository.findByIdAndStatus(studyMethodId, CategoryStatus.ACTIVE) - .orElseThrow(() -> new StudyHandler(ErrorStatus.STUDY_TYPE_NOT_FOUND)); + StudyMethod studyMethod = studyMethodRepository.findByIdAndStatus(studyMethodId, + CategoryStatus.ACTIVE) + .orElseThrow(() -> new StudyHandler(ErrorStatus.STUDY_TYPE_NOT_FOUND)); // 해당 studyMethod가 member의 것이 맞는지 검증 if (!studyMethod.getMember().equals(member)) { @@ -159,13 +205,15 @@ public StudyPlace insertStudyPlace(StudyRequest.studyPlaceRequest request, Membe } // 이미 존재하는 이름의 StudyPlace인지 검증 - boolean exists = studyPlaceRepository.existsByMemberAndTitleAndStatus(member, request.getTitle(), CategoryStatus.ACTIVE); + boolean exists = studyPlaceRepository.existsByMemberAndTitleAndStatus(member, + request.getTitle(), CategoryStatus.ACTIVE); if (exists) { throw new StudyHandler(ErrorStatus.STUDY_PLACE_ALREADY_EXISTS); } // StudyPlace 엔티티 생성 및 연관관계 매핑 - StudyPlace studyPlace = StudyConverter.toStudyPlace(request.getTitle(), member.getStudyPlaceList().size() + 1); + StudyPlace studyPlace = StudyConverter.toStudyPlace(request.getTitle(), + member.getStudyPlaceList().size() + 1); studyPlace.setMember(member); return studyPlaceRepository.save(studyPlace); @@ -177,31 +225,52 @@ public List getStudyPlaces(Member member) { } @Transactional - public StudyPlace updateStudyPlace(StudyRequest.studyPlaceRequest request, Long studyPlaceId, Member member) { - StudyPlace studyPlace = studyPlaceRepository.findByIdAndStatus(studyPlaceId, CategoryStatus.ACTIVE) - .orElseThrow(() -> new StudyHandler(ErrorStatus.STUDY_PLACE_NOT_FOUND)); + public StudyPlace updateStudyPlace(StudyRequest.studyPlaceRequest request, Long studyPlaceId, + Member member) { + StudyPlace studyPlace = studyPlaceRepository.findByIdAndStatus(studyPlaceId, + CategoryStatus.ACTIVE) + .orElseThrow(() -> new StudyHandler(ErrorStatus.STUDY_PLACE_NOT_FOUND)); // 해당 studyPlace가 member의 것이 맞는지 검증 if (!studyPlace.getMember().equals(member)) { throw new StudyHandler(ErrorStatus.NOT_STUDY_PLACE_OWNER); } - // 활성화된 공부 징소와의 이름 중복 여부 검증 - boolean exists = studyPlaceRepository.existsByMemberAndTitleAndStatus(member, request.getTitle(), CategoryStatus.ACTIVE); - if (exists) { - throw new StudyHandler(ErrorStatus.STUDY_PLACE_ALREADY_EXISTS); + // title을 수정하는 경우 + if (request.getTitle() != null) { + // 활성화된 공부 징소와의 이름 중복 여부 검증 + boolean exists = studyPlaceRepository.existsByMemberAndTitleAndStatus(member, + request.getTitle(), CategoryStatus.ACTIVE); + if (exists) { + throw new StudyHandler(ErrorStatus.STUDY_PLACE_ALREADY_EXISTS); + } + + // studyPlace의 이름 수정 + studyPlace.setTitle(request.getTitle()); } - // studyPlace의 이름 수정 - studyPlace.setTitle(request.getTitle()); + // default 여부를 수정하는 경우 + if (request.getIsDefault() != null) { + List defaultStudyPlace = member.getStudyPlaceList().stream() + .filter(StudyPlace::isDefault).collect(Collectors.toList()); + if (!defaultStudyPlace.isEmpty()) { // 기존 default 값이 존재하는 경우 + + // 기존 default 값 해제 + defaultStudyPlace.get(0).updateIsDefault(false); + + // 요청한 studyMethod를 default true로 변경 + studyPlace.updateIsDefault(true); + } + } return studyPlace; } @Transactional public void deleteStudyPlace(Long studyPlaceId, Member member) { - StudyPlace studyPlace = studyPlaceRepository.findByIdAndStatus(studyPlaceId, CategoryStatus.ACTIVE) - .orElseThrow(() -> new StudyHandler(ErrorStatus.STUDY_PLACE_NOT_FOUND)); + StudyPlace studyPlace = studyPlaceRepository.findByIdAndStatus(studyPlaceId, + CategoryStatus.ACTIVE) + .orElseThrow(() -> new StudyHandler(ErrorStatus.STUDY_PLACE_NOT_FOUND)); // 해당 studyPlace가 member의 것이 맞는지 검증 if (!studyPlace.getMember().equals(member)) { diff --git a/src/main/java/timify/com/study/controller/StudyControllerImpl.java b/src/main/java/timify/com/study/controller/StudyControllerImpl.java index 0ae81da..a2296a0 100644 --- a/src/main/java/timify/com/study/controller/StudyControllerImpl.java +++ b/src/main/java/timify/com/study/controller/StudyControllerImpl.java @@ -7,6 +7,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PatchMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -54,7 +55,7 @@ public ApiResponse> getStudyType(@AuthMember Member member) { } @Override - @PostMapping("/type/{studyTypeId}/update") + @PatchMapping("/type/{studyTypeId}/update") public ApiResponse updateStudyType( @AuthMember Member member, @RequestBody @Valid StudyRequest.studyTypeRequest request, @@ -98,7 +99,7 @@ public ApiResponse> getStudyMethod( } @Override - @PostMapping("/method/{studyMethodId}/update") + @PatchMapping("/method/{studyMethodId}/update") public ApiResponse updateStudyMethod( @AuthMember Member member, @RequestBody @Valid StudyRequest.studyMethodRequest request, @@ -141,7 +142,7 @@ public ApiResponse> getStudyPlace(@AuthMember } @Override - @PostMapping("/place/{studyPlaceId}/update") + @PatchMapping("/place/{studyPlaceId}/update") public ApiResponse updateStudyPlace( @AuthMember Member member, @RequestBody @Valid StudyRequest.studyPlaceRequest request, diff --git a/src/main/java/timify/com/study/domain/StudyMethod.java b/src/main/java/timify/com/study/domain/StudyMethod.java index 42ab1f9..5d458c9 100644 --- a/src/main/java/timify/com/study/domain/StudyMethod.java +++ b/src/main/java/timify/com/study/domain/StudyMethod.java @@ -1,7 +1,21 @@ package timify.com.study.domain; -import jakarta.persistence.*; -import lombok.*; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import lombok.AccessLevel; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; import timify.com.domain.common.BaseDateTimeEntity; import timify.com.member.domain.Member; @@ -11,6 +25,7 @@ @NoArgsConstructor(access = AccessLevel.PROTECTED) @AllArgsConstructor public class StudyMethod extends BaseDateTimeEntity { + @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "study_method_id") @@ -23,6 +38,9 @@ public class StudyMethod extends BaseDateTimeEntity { @Column(nullable = false, length = 3) private int orderNum; + @Column(nullable = false) + private boolean isDefault; + @Enumerated(EnumType.STRING) @Column(columnDefinition = "VARCHAR(10)", nullable = false) @Setter @@ -41,4 +59,8 @@ public void setMember(Member member) { this.member.getStudyMethodList().add(this); } + public void updateIsDefault(boolean isDefault) { + this.isDefault = isDefault; + } + } diff --git a/src/main/java/timify/com/study/domain/StudyPlace.java b/src/main/java/timify/com/study/domain/StudyPlace.java index 2d37d53..8f9f225 100644 --- a/src/main/java/timify/com/study/domain/StudyPlace.java +++ b/src/main/java/timify/com/study/domain/StudyPlace.java @@ -1,7 +1,21 @@ package timify.com.study.domain; -import jakarta.persistence.*; -import lombok.*; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import lombok.AccessLevel; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; import timify.com.domain.common.BaseDateTimeEntity; import timify.com.member.domain.Member; @@ -11,6 +25,7 @@ @NoArgsConstructor(access = AccessLevel.PROTECTED) @AllArgsConstructor public class StudyPlace extends BaseDateTimeEntity { + @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "study_place_id") @@ -23,6 +38,9 @@ public class StudyPlace extends BaseDateTimeEntity { @Column(nullable = false, length = 3) private int orderNum; + @Column(nullable = false) + private boolean isDefault; + @Enumerated(EnumType.STRING) @Column(columnDefinition = "VARCHAR(10)", nullable = false) @Setter @@ -41,4 +59,8 @@ public void setMember(Member member) { this.member.getStudyPlaceList().add(this); } + public void updateIsDefault(boolean isDefault) { + this.isDefault = isDefault; + } + } diff --git a/src/main/java/timify/com/study/domain/StudyType.java b/src/main/java/timify/com/study/domain/StudyType.java index 7a7b1c7..6c059b0 100644 --- a/src/main/java/timify/com/study/domain/StudyType.java +++ b/src/main/java/timify/com/study/domain/StudyType.java @@ -1,7 +1,21 @@ package timify.com.study.domain; -import jakarta.persistence.*; -import lombok.*; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import lombok.AccessLevel; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; import timify.com.domain.common.BaseDateTimeEntity; import timify.com.member.domain.Member; @@ -11,6 +25,7 @@ @NoArgsConstructor(access = AccessLevel.PROTECTED) @AllArgsConstructor public class StudyType extends BaseDateTimeEntity { + @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "study_type_id") @@ -23,6 +38,9 @@ public class StudyType extends BaseDateTimeEntity { @Column(nullable = false, length = 3) private int orderNum; + @Column(nullable = false) + private boolean isDefault; + @Enumerated(EnumType.STRING) @Column(columnDefinition = "VARCHAR(10)", nullable = false) @Setter @@ -41,4 +59,8 @@ public void setMember(Member member) { this.member.getStudyTypeList().add(this); } + public void updateIsDefault(boolean isDefault) { + this.isDefault = isDefault; + } + } diff --git a/src/main/java/timify/com/study/dto/StudyRequest.java b/src/main/java/timify/com/study/dto/StudyRequest.java index d620f69..1076d2f 100644 --- a/src/main/java/timify/com/study/dto/StudyRequest.java +++ b/src/main/java/timify/com/study/dto/StudyRequest.java @@ -1,9 +1,9 @@ package timify.com.study.dto; -import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Getter; import lombok.NoArgsConstructor; +import timify.com.common.validation.NotBlankIfNotNull; public class StudyRequest { @@ -11,26 +11,34 @@ public class StudyRequest { @NoArgsConstructor public static class studyTypeRequest { - @NotBlank @Size(min = 1, max = 30) + @NotBlankIfNotNull // title 값이 넘어오지 않을 수 있으며, 값이 있는 경우에는 공백일 수 없음 String title; + + Boolean isDefault; } @Getter @NoArgsConstructor public static class studyMethodRequest { - @NotBlank @Size(min = 1, max = 30) + @NotBlankIfNotNull // title 값이 넘어오지 않을 수 있으며, 값이 있는 경우에는 공백일 수 없음 String title; + + Boolean isDefault; + } @Getter @NoArgsConstructor public static class studyPlaceRequest { - @NotBlank @Size(min = 1, max = 30) + @NotBlankIfNotNull // title 값이 넘어오지 않을 수 있으며, 값이 있는 경우에는 공백일 수 없음 String title; + + Boolean isDefault; + } } diff --git a/src/main/java/timify/com/study/dto/StudyResponse.java b/src/main/java/timify/com/study/dto/StudyResponse.java index fcc029e..6ad6421 100644 --- a/src/main/java/timify/com/study/dto/StudyResponse.java +++ b/src/main/java/timify/com/study/dto/StudyResponse.java @@ -16,6 +16,7 @@ public static class studyTypeDto { Long studyTypeId; Integer order; String studyTypeTitle; + Boolean isDefault; } @Builder @@ -27,6 +28,7 @@ public static class studyMethodDto { Long studyMethodId; Integer order; String studyMethodTitle; + Boolean isDefault; } @Builder @@ -38,5 +40,6 @@ public static class studyPlaceDto { Long studyPlaceId; Integer order; String studyPlaceTitle; + Boolean isDefault; } }