-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #127 from team9502/dev
배포
- Loading branch information
Showing
11 changed files
with
293 additions
and
129 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
34 changes: 34 additions & 0 deletions
34
...in/java/team9502/sinchulgwinong/domain/scrap/dto/response/CpUserScrapListResponseDTO.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,34 @@ | ||
package team9502.sinchulgwinong.domain.scrap.dto.response; | ||
|
||
import lombok.Getter; | ||
import team9502.sinchulgwinong.domain.companyUser.dto.response.CpUserProfileResponseDTO; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
public class CpUserScrapListResponseDTO { | ||
|
||
private Long totalCpScrapCount; | ||
|
||
private int currentPage; | ||
|
||
private int totalPages; | ||
|
||
private int pageSize; | ||
|
||
private List<CpUserProfileResponseDTO> cpUserProfileResponseDTOS; | ||
|
||
public CpUserScrapListResponseDTO( | ||
List<CpUserProfileResponseDTO> cpUserProfileResponseDTOS, | ||
Long totalCpScrapCount, | ||
int currentPage, | ||
int totalPages, | ||
int pageSize) { | ||
|
||
this.totalCpScrapCount = totalCpScrapCount; | ||
this.currentPage = currentPage; | ||
this.totalPages = totalPages; | ||
this.pageSize = pageSize; | ||
this.cpUserProfileResponseDTOS = cpUserProfileResponseDTOS; | ||
} | ||
} |
22 changes: 0 additions & 22 deletions
22
src/main/java/team9502/sinchulgwinong/domain/scrap/dto/response/JobScrapResponseDTO.java
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
src/main/java/team9502/sinchulgwinong/domain/scrap/dto/response/ScrapResponseDTO.java
This file was deleted.
Oops, something went wrong.
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
26 changes: 26 additions & 0 deletions
26
src/main/java/team9502/sinchulgwinong/domain/scrap/entity/CpUserScrap.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,26 @@ | ||
package team9502.sinchulgwinong.domain.scrap.entity; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import team9502.sinchulgwinong.domain.companyUser.entity.CompanyUser; | ||
import team9502.sinchulgwinong.domain.user.entity.User; | ||
|
||
@Getter | ||
@Entity | ||
public class CpUserScrap { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long cpUserScrapId; | ||
|
||
@Setter | ||
@ManyToOne | ||
@JoinColumn(name = "cp_user_id") | ||
private CompanyUser companyUser; | ||
|
||
@Setter | ||
@OneToOne | ||
@JoinColumn(name = "userId") | ||
private User user; | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/team9502/sinchulgwinong/domain/scrap/repository/BoardScrapsRepository.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,15 @@ | ||
package team9502.sinchulgwinong.domain.scrap.repository; | ||
|
||
import org.springframework.data.domain.Page; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import team9502.sinchulgwinong.domain.scrap.entity.BoardScrap; | ||
|
||
public interface BoardScrapsRepository extends JpaRepository<BoardScrap, Long> { | ||
|
||
Page<BoardScrap> findByUser_UserId(Long userId, Pageable pageable); | ||
|
||
boolean existsByUser_UserIdAndBoard_BoardId(Long userId, Long boardId); | ||
|
||
BoardScrap findByUser_UserIdAndBoard_BoardId(Long userId, Long boardId); | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/team9502/sinchulgwinong/domain/scrap/repository/CpUserScrapRepository.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,15 @@ | ||
package team9502.sinchulgwinong.domain.scrap.repository; | ||
|
||
import org.springframework.data.domain.Page; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import team9502.sinchulgwinong.domain.scrap.entity.CpUserScrap; | ||
|
||
public interface CpUserScrapRepository extends JpaRepository<CpUserScrap, Long> { | ||
|
||
boolean existsByCompanyUser_CpUserIdAndUser_UserId(Long cpUserId, Long userId); | ||
|
||
CpUserScrap findByCompanyUser_CpUserId(Long cpUserId); | ||
|
||
Page<CpUserScrap> findByUser_UserId(Long userId, Pageable pageable); | ||
} |
8 changes: 5 additions & 3 deletions
8
src/main/java/team9502/sinchulgwinong/domain/scrap/repository/JobScrapRepository.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,13 +1,15 @@ | ||
package team9502.sinchulgwinong.domain.scrap.repository; | ||
|
||
import org.springframework.data.domain.Page; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import team9502.sinchulgwinong.domain.scrap.entity.JobScrap; | ||
|
||
import java.util.List; | ||
|
||
public interface JobScrapRepository extends JpaRepository<JobScrap, Long> { | ||
|
||
boolean existsByJobBoard_JobBoardIdAndUser_UserId(Long jobBoardId, Long userId); | ||
|
||
JobScrap findByJobBoard_JobBoardIdAndUser_UserId(Long jobBoardId, Long userId); | ||
List<JobScrap> findByUser_UserId(Long userId); | ||
|
||
Page<JobScrap> findByUser_UserId(Long userId, Pageable pageable); | ||
} |
15 changes: 0 additions & 15 deletions
15
src/main/java/team9502/sinchulgwinong/domain/scrap/repository/ScrapsRepository.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.