diff --git a/src/main/java/com/core/linkup/club/controller/ClubController.java b/src/main/java/com/core/linkup/club/controller/ClubController.java index 5206219..1339ab3 100644 --- a/src/main/java/com/core/linkup/club/controller/ClubController.java +++ b/src/main/java/com/core/linkup/club/controller/ClubController.java @@ -1,34 +1,82 @@ package com.core.linkup.club.controller; -import com.core.linkup.club.request.ClubRequest; -import com.core.linkup.club.response.ClubsResponse; +import com.core.linkup.club.requset.ClubCreateRequest; +import com.core.linkup.club.requset.ClubSearchRequest; +import com.core.linkup.club.requset.ClubUpdateRequest; +import com.core.linkup.club.response.ClubSearchResponse; import com.core.linkup.club.service.ClubService; import com.core.linkup.common.response.BaseResponse; import com.core.linkup.security.MemberDetails; -import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; +import org.springframework.data.web.PageableDefault; import org.springframework.security.core.annotation.AuthenticationPrincipal; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.*; -import java.util.List; - -@Controller +@RestController @RequiredArgsConstructor @RequestMapping("/api/v1/club") public class ClubController { private final ClubService clubService; + //소모임 개별조회 + @GetMapping("/{clubId}") + public BaseResponse findClub( + @AuthenticationPrincipal MemberDetails member, + @PathVariable Long clubId + ) { + ClubSearchResponse response = clubService.findClub(clubId); + return BaseResponse.response(response); + } + + //소모임 필터링으로 조회 (ClubType으로 조회 가능) + //TODO : OfficeBuilding으로 조회 가능 하도록 할 예정 + @GetMapping("/search") + public BaseResponse> findClubs( + @PageableDefault(sort = "id", direction = Sort.Direction.ASC) Pageable pageable, + @ModelAttribute ClubSearchRequest request + ) { + Page searchResponse = clubService.findClubs(pageable, request); + return BaseResponse.response(searchResponse); + } + + //소모임 등록 @PostMapping - public BaseResponse> clubRegister( + public BaseResponse create( + @AuthenticationPrincipal MemberDetails member, + @RequestBody ClubCreateRequest request + ) { + ClubSearchResponse response = clubService.createClub(member, request); + return BaseResponse.response(response); + } + + //소모임 수정 + @PutMapping("/{club_id}") + public BaseResponse update( + @AuthenticationPrincipal MemberDetails member, + @PathVariable("club_id") Long clubId, + @RequestBody ClubUpdateRequest updateRequest + ) { + ClubSearchResponse updatedClub = clubService.updateClub(member, clubId, updateRequest); + return BaseResponse.response(updatedClub); + } + + //소모임 삭제 + @DeleteMapping("/{club_id}") + public BaseResponse delete( @AuthenticationPrincipal MemberDetails member, - @Valid @RequestBody ClubRequest clubRequest + @PathVariable("club_id") Long clubId ) { - List clubsResponses = clubService.clubRegister(member, clubRequest); - return BaseResponse.response(clubsResponses); + clubService.delete(member, clubId); + return BaseResponse.response("OK"); } +// @GetMapping("/member/{memberId}") +// public ResponseEntity> getClubsByMemberId(@PathVariable Long memberId) { +// List response = clubService.getClubsByMemberId(memberId); +// return ResponseEntity.ok(response); +// } } diff --git a/src/main/java/com/core/linkup/club/converter/ClubConverter.java b/src/main/java/com/core/linkup/club/converter/ClubConverter.java index bf6d512..29496dc 100644 --- a/src/main/java/com/core/linkup/club/converter/ClubConverter.java +++ b/src/main/java/com/core/linkup/club/converter/ClubConverter.java @@ -1,8 +1,74 @@ package com.core.linkup.club.converter; +import com.core.linkup.club.entity.Club; +import com.core.linkup.club.requset.ClubCreateRequest; +import com.core.linkup.club.requset.ClubUpdateRequest; +import com.core.linkup.club.response.ClubSearchResponse; import com.core.linkup.common.annotation.Converter; +import com.core.linkup.common.entity.enums.ClubType; +import com.core.linkup.common.exception.BaseException; +import com.core.linkup.common.response.BaseResponseStatus; +import com.core.linkup.member.entity.Member; @Converter public class ClubConverter { + public ClubSearchResponse toClubResponse(Club club) { + return ClubSearchResponse.builder() + .id(club.getId()) + .title(club.getTitle()) + .introduction(club.getIntroduction()) + .clubType(club.getCategory()) + .recruitCount(club.getRecruitCount()) + .build(); + } + + + public Club toClubEntity(ClubCreateRequest request, Long memberId) { + ClubType category; + try { + category = ClubType.fromKor(String.valueOf(request.clubType())); + } catch (IllegalArgumentException e) { + throw new BaseException(BaseResponseStatus.INVALID_REQUEST); + } + Club club = Club.builder() + .category(String.valueOf(category)) + .clubAccessibility(request.clubAccessibility()) + .title(request.title()) + .introduction(request.introduction()) + .recruitCount(request.recruitCount()) + .detailedIntroduction(request.detailedIntroduction()) + .applicationIntroduction(request.applicationIntroduction()) + .clubThumbnail(request.clubThumbnail()) + .member( + Member.builder().id(memberId).build()) + .build(); + + //TODO : list로 question 받는거 해야 함, clubid르 null로 받아옴 +// Optional.ofNullable(request.clubQuestions()).orElse(List.of()).forEach(q -> { +// ClubQuestion clubQuestion = ClubQuestion.builder() +// .question(q.getQuestion()) +// .qorders(q.getQorders()) +// .build(); +// clubQuestion.setClub(club); +// club.getClubQuestions().add(clubQuestion); +// }); + + return club; + } + + public Club updateClubEntity(Club updateClub, ClubUpdateRequest updateRequest) { + ClubType category = ClubType.fromKor(String.valueOf(updateRequest.clubType())); + return Club.builder() + .id(updateClub.getId()) + .category(String.valueOf(category)) + .title(updateRequest.title()) + .introduction(updateRequest.introduction()) + .recruitCount(updateRequest.recruitCount()) + .detailedIntroduction(updateRequest.detailedIntroduction()) + .applicationIntroduction(updateRequest.applicationIntroduction()) + .clubThumbnail(updateRequest.clubThumbnail()) + .build(); + } + } diff --git a/src/main/java/com/core/linkup/club/entity/Club.java b/src/main/java/com/core/linkup/club/entity/Club.java index edfb2bd..faa3e27 100644 --- a/src/main/java/com/core/linkup/club/entity/Club.java +++ b/src/main/java/com/core/linkup/club/entity/Club.java @@ -3,26 +3,27 @@ import com.core.linkup.common.entity.BaseEntity; import com.core.linkup.member.entity.Member; import com.core.linkup.office.entity.OfficeBuilding; -import jakarta.persistence.Entity; -import jakarta.persistence.JoinColumn; -import jakarta.persistence.ManyToOne; -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; +import jakarta.persistence.*; +import lombok.*; +import lombok.experimental.SuperBuilder; + +import java.util.ArrayList; +import java.util.List; @Entity(name = "club") @NoArgsConstructor @AllArgsConstructor @Getter +@SuperBuilder public class Club extends BaseEntity { - @ManyToOne - @JoinColumn(name = "office_building_id") - private OfficeBuilding locationId; - +// @ManyToOne +// @JoinColumn(name = "office_building_id") +// private OfficeBuilding officeBuilding; +// @ManyToOne @JoinColumn(name = "member_id") - private Member memberId; + private Member member; private Boolean clubAccessibility; private String category; @@ -33,4 +34,7 @@ public class Club extends BaseEntity { private String clubThumbnail; private String applicationIntroduction; + @OneToMany + private List clubQuestions = new ArrayList<>(); + } diff --git a/src/main/java/com/core/linkup/club/entity/ClubQuestion.java b/src/main/java/com/core/linkup/club/entity/ClubQuestion.java index b994166..54f33a4 100644 --- a/src/main/java/com/core/linkup/club/entity/ClubQuestion.java +++ b/src/main/java/com/core/linkup/club/entity/ClubQuestion.java @@ -3,17 +3,21 @@ import com.core.linkup.common.entity.BaseEntity; import jakarta.persistence.Entity; import jakarta.persistence.ManyToOne; -import lombok.AllArgsConstructor; -import lombok.NoArgsConstructor; +import lombok.*; +import lombok.experimental.SuperBuilder; @Entity(name = "club_question") @NoArgsConstructor @AllArgsConstructor +@Getter +@SuperBuilder public class ClubQuestion extends BaseEntity { + @Setter @ManyToOne - private Club clubId; + private Club club; private String question; - private Integer order; + private Integer qorders; + } diff --git a/src/main/java/com/core/linkup/club/repository/ClubCustomRepository.java b/src/main/java/com/core/linkup/club/repository/ClubCustomRepository.java new file mode 100644 index 0000000..b568665 --- /dev/null +++ b/src/main/java/com/core/linkup/club/repository/ClubCustomRepository.java @@ -0,0 +1,13 @@ +package com.core.linkup.club.repository; + +import com.core.linkup.club.entity.Club; +import com.core.linkup.club.requset.ClubSearchRequest; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import java.util.List; + +public interface ClubCustomRepository { + + Page findSearchClubs(ClubSearchRequest request, Pageable pageable); +} diff --git a/src/main/java/com/core/linkup/club/repository/ClubCustomRepositoryImpl.java b/src/main/java/com/core/linkup/club/repository/ClubCustomRepositoryImpl.java new file mode 100644 index 0000000..6ffc47c --- /dev/null +++ b/src/main/java/com/core/linkup/club/repository/ClubCustomRepositoryImpl.java @@ -0,0 +1,49 @@ +package com.core.linkup.club.repository; + +import com.core.linkup.club.entity.Club; +import com.core.linkup.club.entity.QClub; +import com.core.linkup.club.requset.ClubSearchRequest; +import com.core.linkup.common.entity.enums.ClubType; +import com.querydsl.core.BooleanBuilder; +import com.querydsl.jpa.impl.JPAQueryFactory; +import lombok.RequiredArgsConstructor; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageImpl; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +@RequiredArgsConstructor +public class ClubCustomRepositoryImpl implements ClubCustomRepository { + + private final JPAQueryFactory queryFactory; + + @Override + public Page findSearchClubs(ClubSearchRequest request, Pageable pageable) { + QClub club = QClub.club; + + BooleanBuilder booleanBuilder = new BooleanBuilder(); + +// if (request.getOfficeBuildingId() != null) { +// booleanBuilder.and(club.officeBuilding.id.eq(request.getOfficeBuildingId())); +// } + if (request.getClubType() != null && !request.getClubType().isEmpty()) { + ClubType clubType = ClubType.fromKor(request.getClubType()); + booleanBuilder.and(club.category.eq(String.valueOf(clubType))); + } + + List clubs = queryFactory.selectFrom(club) + .where(booleanBuilder) + .offset(pageable.getOffset()) + .limit(pageable.getPageSize()) + .fetch(); + + long total = queryFactory.selectFrom(club) + .where(booleanBuilder) + .fetchCount(); + + return new PageImpl<>(clubs, pageable, total); + } +} diff --git a/src/main/java/com/core/linkup/club/repository/ClubRepository.java b/src/main/java/com/core/linkup/club/repository/ClubRepository.java index c93e69f..d13db11 100644 --- a/src/main/java/com/core/linkup/club/repository/ClubRepository.java +++ b/src/main/java/com/core/linkup/club/repository/ClubRepository.java @@ -5,6 +5,6 @@ import org.springframework.stereotype.Repository; @Repository -public interface ClubRepository extends JpaRepository { +public interface ClubRepository extends JpaRepository, ClubCustomRepository { } diff --git a/src/main/java/com/core/linkup/club/request/ClubQuestionRequest.java b/src/main/java/com/core/linkup/club/request/ClubQuestionRequest.java new file mode 100644 index 0000000..2d8b9e0 --- /dev/null +++ b/src/main/java/com/core/linkup/club/request/ClubQuestionRequest.java @@ -0,0 +1,10 @@ +package com.core.linkup.club.request; + +import lombok.Builder; + +@Builder +public record ClubQuestionRequest( + String question, + Integer orders +) { +} diff --git a/src/main/java/com/core/linkup/club/request/ClubRequest.java b/src/main/java/com/core/linkup/club/request/ClubRequest.java deleted file mode 100644 index 7093c1f..0000000 --- a/src/main/java/com/core/linkup/club/request/ClubRequest.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.core.linkup.club.request; - -import lombok.*; - -@Getter -@NoArgsConstructor -@AllArgsConstructor -public class ClubRequest { - - private Long officeBuildingId; - private String category; - private Boolean clubAccessibility; - private Integer recruitCount; - private String title; - private String introduction; - private String detailedIntroduction; - private String applicationIntroduction; - private String clubThumbnail; - -} diff --git a/src/main/java/com/core/linkup/club/requset/ClubCreateRequest.java b/src/main/java/com/core/linkup/club/requset/ClubCreateRequest.java new file mode 100644 index 0000000..b3e8bcd --- /dev/null +++ b/src/main/java/com/core/linkup/club/requset/ClubCreateRequest.java @@ -0,0 +1,19 @@ +package com.core.linkup.club.requset; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; + +@Builder +public record ClubCreateRequest( + String title, + String introduction, + @JsonProperty("category") + String clubType, + Integer recruitCount, + Boolean clubAccessibility, + String detailedIntroduction, + String clubThumbnail, + String applicationIntroduction +// List clubQuestions +) { +} diff --git a/src/main/java/com/core/linkup/club/requset/ClubSearchRequest.java b/src/main/java/com/core/linkup/club/requset/ClubSearchRequest.java new file mode 100644 index 0000000..31add56 --- /dev/null +++ b/src/main/java/com/core/linkup/club/requset/ClubSearchRequest.java @@ -0,0 +1,14 @@ +package com.core.linkup.club.requset; + +import lombok.*; + +@Getter +@RequiredArgsConstructor +@AllArgsConstructor +@Setter +public class ClubSearchRequest { + + private Long officeBuildingId; + private String clubType; + +} diff --git a/src/main/java/com/core/linkup/club/requset/ClubUpdateRequest.java b/src/main/java/com/core/linkup/club/requset/ClubUpdateRequest.java new file mode 100644 index 0000000..9fdb29b --- /dev/null +++ b/src/main/java/com/core/linkup/club/requset/ClubUpdateRequest.java @@ -0,0 +1,18 @@ +package com.core.linkup.club.requset; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; + +@Builder +public record ClubUpdateRequest ( + String title, + String introduction, + @JsonProperty("category") + String clubType, + Integer recruitCount, + Boolean clubAccessibility, + String detailedIntroduction, + String clubThumbnail, + String applicationIntroduction +) { +} diff --git a/src/main/java/com/core/linkup/club/response/ClubSearchResponse.java b/src/main/java/com/core/linkup/club/response/ClubSearchResponse.java new file mode 100644 index 0000000..d0942c9 --- /dev/null +++ b/src/main/java/com/core/linkup/club/response/ClubSearchResponse.java @@ -0,0 +1,17 @@ +package com.core.linkup.club.response; + +import lombok.Builder; + +@Builder +public record ClubSearchResponse( + Long id, + Long memberId, + String title, + String introduction, + String clubType, + Integer recruitCount + + // clubmemeber, + // clubmeeting +) { +} diff --git a/src/main/java/com/core/linkup/club/response/ClubsResponse.java b/src/main/java/com/core/linkup/club/response/ClubsResponse.java deleted file mode 100644 index e1ebcd5..0000000 --- a/src/main/java/com/core/linkup/club/response/ClubsResponse.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.core.linkup.club.response; - -import com.core.linkup.club.entity.Club;; - -public class ClubsResponse { - private Long id; - private String clubThumbnail; - private String detailedIntroduction; - private String title; - private int recruitCount; - - public ClubsResponse(Club club) { - this.id = club.getId(); - this.clubThumbnail = club.getClubThumbnail(); - this.detailedIntroduction = club.getDetailedIntroduction(); - this.title = club.getTitle(); - this.recruitCount = club.getRecruitCount(); - } -} diff --git a/src/main/java/com/core/linkup/club/service/ClubService.java b/src/main/java/com/core/linkup/club/service/ClubService.java index d5dbd12..4b24969 100644 --- a/src/main/java/com/core/linkup/club/service/ClubService.java +++ b/src/main/java/com/core/linkup/club/service/ClubService.java @@ -1,70 +1,71 @@ package com.core.linkup.club.service; +import com.core.linkup.club.converter.ClubConverter; import com.core.linkup.club.entity.Club; import com.core.linkup.club.repository.ClubRepository; -import com.core.linkup.club.request.ClubRequest; -import com.core.linkup.club.response.ClubsResponse; -import com.core.linkup.common.entity.enums.CategoryType; +import com.core.linkup.club.requset.ClubCreateRequest; +import com.core.linkup.club.requset.ClubSearchRequest; +import com.core.linkup.club.requset.ClubUpdateRequest; +import com.core.linkup.club.response.ClubSearchResponse; import com.core.linkup.common.exception.BaseException; -import com.core.linkup.member.entity.Member; -import com.core.linkup.member.repository.MemberRepository; -import com.core.linkup.office.entity.OfficeBuilding; -import com.core.linkup.office.repository.OfficeRepository; +import com.core.linkup.common.response.BaseResponseStatus; import com.core.linkup.security.MemberDetails; import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.Collections; -import java.util.List; - -import static com.core.linkup.common.response.BaseResponseStatus.INVALID_OFFICEBUILDING_ID; -import static com.core.linkup.common.response.BaseResponseStatus.UNREGISTERD_MEMBER; @Service -@Transactional +@Slf4j @RequiredArgsConstructor public class ClubService { private final ClubRepository clubRepository; - private final OfficeRepository officeRepository; - private final MemberRepository memberRepository; + // private final ClubCustomRepository clubCustomRepository; + private final ClubConverter clubConverter; - // public void clubRegister(MemberDetails memberDetails, ClubRequest clubRequest) { - public List clubRegister(MemberDetails memberDetails, ClubRequest clubRequest) { - if (memberDetails != null) { - Long memberId = memberDetails.getId(); - Member member = memberRepository.findById(memberId) - .orElseThrow(() -> new BaseException(UNREGISTERD_MEMBER)); + public ClubSearchResponse findClub(Long clubId) { + return clubRepository.findById(clubId).map(clubConverter::toClubResponse) + .orElseThrow(() -> new BaseException(BaseResponseStatus.INVALID_CLUB_ID)); + } - //TODO : officeId는 멤버십을 결재 한 후에 가져오는 것을 확인 - //TODO : 질문도 연관 관계 해서 가져오는 것을 해야함 - OfficeBuilding officeBuilding = officeRepository.findById(clubRequest.getOfficeBuildingId()) - .orElseThrow(() -> new BaseException(INVALID_OFFICEBUILDING_ID)); + public Page findClubs(Pageable pageable, ClubSearchRequest request) { + return clubRepository.findSearchClubs(request, pageable) + .map(clubConverter::toClubResponse); + } -// Club club = createClub(member, clubRequest); - Club club = createClub(member, officeBuilding, clubRequest); - Club savedClub = clubRepository.save(club); - return List.of(new ClubsResponse(savedClub)); + public ClubSearchResponse createClub(MemberDetails member, ClubCreateRequest request) { + if (member == null) { + throw new BaseException(BaseResponseStatus.UNREGISTERD_MEMBER); } - return Collections.emptyList(); + + Long memberId = member.getId(); + Club club = clubConverter.toClubEntity(request, memberId); + Club savedClub = clubRepository.save(club); + + return clubConverter.toClubResponse(savedClub); } - private Club createClub(Member member, OfficeBuilding officeBuilding, ClubRequest clubRequest){ -// private Club createClub(Member member, ClubRequest clubRequest) { - CategoryType categoryType = CategoryType.fromKor(clubRequest.getCategory()); + public ClubSearchResponse updateClub(MemberDetails member, Long clubId, ClubUpdateRequest updateRequest) { + + Club existingClub = clubRepository.findById(clubId) + .orElseThrow(() -> new BaseException(BaseResponseStatus.INVALID_CLUB_ID)); + Club updatedClub = clubConverter.updateClubEntity(existingClub, updateRequest); + Club savedClub = clubRepository.save(updatedClub); + return clubConverter.toClubResponse(savedClub); + } - return new Club( - officeBuilding, - member, - clubRequest.getClubAccessibility(), - categoryType.getInCategoryInKor(), - clubRequest.getRecruitCount(), - clubRequest.getIntroduction(), - clubRequest.getDetailedIntroduction(), - clubRequest.getTitle(), - clubRequest.getClubThumbnail(), - clubRequest.getApplicationIntroduction() - ); + public void delete(MemberDetails member, Long clubId) { + clubRepository.deleteById(clubId); } + + //멤버 1이 등록한 소모임 조회 +// @Transactional(readOnly = true) +// public List getClubsByMemberId(Long memberId) { +// List clubs = clubCustomRepository.findClubsByMemberId(memberId); +// return clubs.stream() +// .map(clubConverter::toClubResponse) +// .collect(Collectors.toList()); +// } } diff --git a/src/main/java/com/core/linkup/common/entity/BaseEntity.java b/src/main/java/com/core/linkup/common/entity/BaseEntity.java index ce67f21..7a7f707 100644 --- a/src/main/java/com/core/linkup/common/entity/BaseEntity.java +++ b/src/main/java/com/core/linkup/common/entity/BaseEntity.java @@ -24,6 +24,7 @@ public class BaseEntity { protected Long id; @CreatedDate + @Column(updatable = false) private LocalDateTime createdAt; @LastModifiedDate diff --git a/src/main/java/com/core/linkup/common/entity/enums/CategoryType.java b/src/main/java/com/core/linkup/common/entity/enums/CategoryType.java deleted file mode 100644 index f964256..0000000 --- a/src/main/java/com/core/linkup/common/entity/enums/CategoryType.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.core.linkup.common.entity.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -@Getter -@AllArgsConstructor -public enum CategoryType { - SPORTS("운동/스포츠"), - CAREER_DEVELOPMENT("직무계발"), - LANGUAGE("외국어"), - CULTURE_ART("문화/예술"), - TRAVEL("여행"), - VOLUNTEERING("봉사활동"), - MEDIA("미디어관람"), - ECONOMICS("경제/재태크"), - OTHER("기타"); - - private final String inCategoryInKor; - - public static CategoryType fromKor(String inCategoryInKor) { - for (CategoryType type : CategoryType.values()) { - if (type.getInCategoryInKor().equals(inCategoryInKor)) { - return type; - } - } - throw new IllegalArgumentException("No matching occupation type for: " + inCategoryInKor); - } -} diff --git a/src/main/java/com/core/linkup/common/entity/enums/ClubType.java b/src/main/java/com/core/linkup/common/entity/enums/ClubType.java index 3385370..add1084 100644 --- a/src/main/java/com/core/linkup/common/entity/enums/ClubType.java +++ b/src/main/java/com/core/linkup/common/entity/enums/ClubType.java @@ -20,7 +20,7 @@ public enum ClubType{ private final String clubCategoryName; public static ClubType fromKor(String clubCategoryName) { - for (ClubType type : values()) { + for (ClubType type : ClubType.values()) { if (type.getClubCategoryName().equals(clubCategoryName)) { return type; } diff --git a/src/main/java/com/core/linkup/common/response/BaseResponseStatus.java b/src/main/java/com/core/linkup/common/response/BaseResponseStatus.java index 9a6bc36..da7c848 100644 --- a/src/main/java/com/core/linkup/common/response/BaseResponseStatus.java +++ b/src/main/java/com/core/linkup/common/response/BaseResponseStatus.java @@ -36,7 +36,8 @@ public enum BaseResponseStatus { SERVER_ERROR(false, INTERNAL_SERVER_ERROR.value(), "예상하지 못한 서버 에러가 발생했습니다."), INVALID_OFFICEBUILDING_ID(false, INTERNAL_SERVER_ERROR.value(), "존재하지 않는 공유오피스 입니다." ), - INVALID_CLUB_ID(false, BAD_REQUEST.value(), "존재하지 않는 소모임입니다.") + INVALID_CLUB_ID(false, BAD_REQUEST.value(), "존재하지 않는 소모임입니다."), + INVALID_REQUEST(false, INTERNAL_SERVER_ERROR.value(),"잘못된 요청입니다.") ; private final boolean isSuccess; diff --git a/src/main/java/com/core/linkup/reservation/membership/individual/entity/enums/MembershipType.java b/src/main/java/com/core/linkup/reservation/membership/individual/entity/enums/MembershipType.java index a39b205..c4d5ce4 100644 --- a/src/main/java/com/core/linkup/reservation/membership/individual/entity/enums/MembershipType.java +++ b/src/main/java/com/core/linkup/reservation/membership/individual/entity/enums/MembershipType.java @@ -1,6 +1,5 @@ package com.core.linkup.reservation.membership.individual.entity.enums; -import com.core.linkup.common.entity.enums.CategoryType; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/com/core/linkup/reservation/reservation/entity/enums/ReservationType.java b/src/main/java/com/core/linkup/reservation/reservation/entity/enums/ReservationType.java index aa302b4..7d34561 100644 --- a/src/main/java/com/core/linkup/reservation/reservation/entity/enums/ReservationType.java +++ b/src/main/java/com/core/linkup/reservation/reservation/entity/enums/ReservationType.java @@ -1,6 +1,5 @@ package com.core.linkup.reservation.reservation.entity.enums; -import com.core.linkup.common.entity.enums.CategoryType; import lombok.AllArgsConstructor; import lombok.Getter;