-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
5 additions
and
65 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
37 changes: 1 addition & 36 deletions
37
...d/baton/src/main/java/touch/baton/domain/runnerpost/repository/dto/ApplicantCountDto.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,39 +1,4 @@ | ||
package touch.baton.domain.runnerpost.repository.dto; | ||
|
||
import java.util.Objects; | ||
|
||
public class ApplicantCountDto { | ||
|
||
private Long runnerPostId; | ||
|
||
private Long applicantCount; | ||
|
||
public ApplicantCountDto() { | ||
} | ||
|
||
public ApplicantCountDto(final Long runnerPostId, final Long applicantCount) { | ||
this.runnerPostId = runnerPostId; | ||
this.applicantCount = (long) applicantCount; | ||
} | ||
|
||
public Long getRunnerPostId() { | ||
return runnerPostId; | ||
} | ||
|
||
public Long getApplicantCount() { | ||
return applicantCount; | ||
} | ||
|
||
@Override | ||
public boolean equals(final Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
final ApplicantCountDto that = (ApplicantCountDto) o; | ||
return applicantCount == that.applicantCount && Objects.equals(runnerPostId, that.runnerPostId); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(runnerPostId, applicantCount); | ||
} | ||
public record ApplicantCountDto(Long runnerPostId, Long applicantCount) { | ||
} |
26 changes: 1 addition & 25 deletions
26
.../src/main/java/touch/baton/domain/runnerpost/repository/dto/ApplicantCountMappingDto.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,34 +1,10 @@ | ||
package touch.baton.domain.runnerpost.repository.dto; | ||
|
||
import java.util.Map; | ||
import java.util.Objects; | ||
|
||
public class ApplicantCountMappingDto { | ||
|
||
private final Map<Long, Long> applicantCounts; | ||
|
||
public ApplicantCountMappingDto(final Map<Long, Long> applicantCounts) { | ||
this.applicantCounts = applicantCounts; | ||
} | ||
public record ApplicantCountMappingDto(Map<Long, Long> applicantCounts) { | ||
|
||
public Long getApplicantCountByRunnerPostId(final Long runnerPostId) { | ||
return applicantCounts.get(runnerPostId); | ||
} | ||
|
||
public Map<Long, Long> getApplicantCounts() { | ||
return applicantCounts; | ||
} | ||
|
||
@Override | ||
public boolean equals(final Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
final ApplicantCountMappingDto that = (ApplicantCountMappingDto) o; | ||
return Objects.equals(applicantCounts, that.applicantCounts); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(applicantCounts); | ||
} | ||
} |
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