-
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.
π₯[FEAT]-#10- νν° μ 보 μ‘°ν ꡬν
## κ°μ νν° μ 보 μ‘°ν ꡬν
- Loading branch information
1 parent
13647f5
commit d04776d
Showing
6 changed files
with
63 additions
and
5 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
...n/java/com/codingwasabi/trti/domain/memberInParty/repository/MemberInPartyRepository.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,7 +1,9 @@ | ||
package com.codingwasabi.trti.domain.memberInParty.repository; | ||
|
||
import com.codingwasabi.trti.domain.memberInParty.model.MemberInParty; | ||
import com.codingwasabi.trti.domain.party.model.Party; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface MemberInPartyRepository extends JpaRepository<MemberInParty, Long> { | ||
Integer countByParty(Party party); | ||
} |
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
32 changes: 32 additions & 0 deletions
32
src/main/java/com/codingwasabi/trti/domain/party/model/response/ResponsePartyInfoDto.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,32 @@ | ||
package com.codingwasabi.trti.domain.party.model.response; | ||
|
||
import com.codingwasabi.trti.domain.party.model.Party; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Builder | ||
@AllArgsConstructor | ||
public class ResponsePartyInfoDto { | ||
private Long id; | ||
private String title; | ||
private String location; | ||
@Setter | ||
private Integer participantsCount; | ||
private String imageUrl; | ||
private Boolean isAgreed; | ||
private String[] period; | ||
|
||
public static ResponsePartyInfoDto from(Party party) { | ||
return ResponsePartyInfoDto.builder() | ||
.id(party.getId()) | ||
.title(party.getTitle()) | ||
.location(party.getCity().getLocation().getName()) | ||
.imageUrl(party.getImageLink()) | ||
.isAgreed(party.isAgreed()) | ||
.period(party.getPeriod()) | ||
.build(); | ||
} | ||
} |