-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Feature/#63 refactoring club(clubLike)
- Loading branch information
Showing
12 changed files
with
219 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/java/com/core/linkup/club/club/entity/ClubLike.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.core.linkup.club.club.entity; | ||
|
||
import com.core.linkup.common.entity.BaseEntity; | ||
import jakarta.persistence.Entity; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.experimental.SuperBuilder; | ||
|
||
@Entity(name = "club_like") | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Getter | ||
@SuperBuilder | ||
public class ClubLike extends BaseEntity { | ||
|
||
private Long clubId; | ||
private Long memberId; | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/com/core/linkup/club/club/repository/ClubCustomRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
package com.core.linkup.club.club.repository; | ||
|
||
import com.core.linkup.club.club.entity.Club; | ||
import com.core.linkup.club.club.entity.ClubLike; | ||
import com.core.linkup.club.club.request.ClubSearchRequest; | ||
import org.springframework.data.domain.Page; | ||
import org.springframework.data.domain.Pageable; | ||
|
||
public interface ClubCustomRepository { | ||
|
||
Page<Club> findSearchClubs(ClubSearchRequest request, Pageable pageable); | ||
|
||
boolean existsValidMembershipWithLocation(Long memberId); | ||
|
||
Long findOfficeBuildingIdByLocation(String location); | ||
|
||
Page<ClubLike> findClubLikes(Long memberId, Pageable pageable); | ||
|
||
boolean existsByMemberIdAndClubId(Long memberId, Long clubId); | ||
void deleteByMemberIdAndClubId(Long memberId, Long clubId); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/main/java/com/core/linkup/club/club/repository/ClubLikeRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.core.linkup.club.club.repository; | ||
|
||
import com.core.linkup.club.club.entity.ClubLike; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface ClubLikeRepository extends JpaRepository<ClubLike, Long> { | ||
|
||
void deleteByMemberIdAndClubId(Long memberId, Long clubId); | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/java/com/core/linkup/club/club/request/ClubLikeRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.core.linkup.club.club.request; | ||
|
||
public record ClubLikeRequest () { | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/com/core/linkup/club/club/response/ClubLikeResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.core.linkup.club.club.response; | ||
|
||
import lombok.Builder; | ||
|
||
import java.time.LocalDate; | ||
|
||
@Builder | ||
public record ClubLikeResponse( | ||
Long id, | ||
Long clubId, | ||
Long memberId, | ||
String clubThumbnail, | ||
String clubName, | ||
String clubIntroduction, | ||
Integer clubMemberCount, | ||
LocalDate clubMeetingDate | ||
) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters