-
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.
- Loading branch information
Showing
29 changed files
with
665 additions
and
58 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
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
2 changes: 0 additions & 2 deletions
2
src/main/java/com/telepigeon/server/dto/room/request/RoomCreateDto.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
9 changes: 9 additions & 0 deletions
9
src/main/java/com/telepigeon/server/dto/room/request/RoomEnterDto.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,9 @@ | ||
package com.telepigeon.server.dto.room.request; | ||
|
||
import jakarta.validation.constraints.NotNull; | ||
|
||
public record RoomEnterDto( | ||
@NotNull | ||
String code | ||
) { | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/com/telepigeon/server/dto/room/response/RoomInfoDto.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 com.telepigeon.server.dto.room.response; | ||
|
||
import com.telepigeon.server.domain.Room; | ||
|
||
public record RoomInfoDto( | ||
String code, | ||
String name | ||
) { | ||
public static RoomInfoDto of(Room room) { | ||
return new RoomInfoDto( | ||
room.getCode(), | ||
room.getName() | ||
); | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
src/main/java/com/telepigeon/server/dto/room/response/RoomListDto.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,38 @@ | ||
package com.telepigeon.server.dto.room.response; | ||
|
||
import com.telepigeon.server.domain.Answer; | ||
import com.telepigeon.server.domain.Profile; | ||
import com.telepigeon.server.domain.Room; | ||
|
||
import java.util.List; | ||
|
||
public record RoomListDto( | ||
List<RoomDto> rooms | ||
) { | ||
|
||
public static RoomListDto of(List<RoomDto> rooms) { | ||
return new RoomListDto(rooms); | ||
} | ||
|
||
public record RoomDto( | ||
Long roomId, | ||
String name, | ||
String opponentNickname, | ||
String myRelation, | ||
String opponentRelation, | ||
Integer emotion, | ||
Integer sentence | ||
) { | ||
public static RoomDto of( | ||
Long roomId, | ||
String name, | ||
String opponentNickname, | ||
String myRelation, | ||
String opponentRelation, | ||
Integer emotion, | ||
Integer sentence | ||
) { | ||
return new RoomDto(roomId, name, opponentNickname, myRelation,opponentRelation, emotion, sentence); | ||
} | ||
} | ||
} |
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
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/telepigeon/server/repository/WorryRepository.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.telepigeon.server.repository; | ||
|
||
import com.telepigeon.server.domain.Profile; | ||
import com.telepigeon.server.domain.Worry; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
import java.util.List; | ||
|
||
public interface WorryRepository extends JpaRepository<Worry, Long> { | ||
List<Worry> findAllByProfile(Profile profile); | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/com/telepigeon/server/service/answer/AnswerRemover.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,16 @@ | ||
package com.telepigeon.server.service.answer; | ||
|
||
import com.telepigeon.server.domain.Answer; | ||
import com.telepigeon.server.repository.AnswerRepository; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
@RequiredArgsConstructor | ||
public class AnswerRemover { | ||
private final AnswerRepository answerRepository; | ||
|
||
public void remove(final Answer answer) { | ||
answerRepository.delete(answer); | ||
} | ||
} |
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
16 changes: 16 additions & 0 deletions
16
src/main/java/com/telepigeon/server/service/profile/ProfileRemover.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,16 @@ | ||
package com.telepigeon.server.service.profile; | ||
|
||
import com.telepigeon.server.domain.Profile; | ||
import com.telepigeon.server.repository.ProfileRepository; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
@RequiredArgsConstructor | ||
public class ProfileRemover { | ||
private final ProfileRepository profileRepository; | ||
|
||
public void remove(final Profile profile) { | ||
profileRepository.delete(profile); | ||
} | ||
} |
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
17 changes: 17 additions & 0 deletions
17
src/main/java/com/telepigeon/server/service/question/QuestionRemover.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,17 @@ | ||
package com.telepigeon.server.service.question; | ||
|
||
import com.telepigeon.server.domain.Question; | ||
import com.telepigeon.server.repository.QuestionRepository; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
@RequiredArgsConstructor | ||
public class QuestionRemover { | ||
|
||
private final QuestionRepository questionRepository; | ||
|
||
public void remove(final Question question) { | ||
questionRepository.delete(question); | ||
} | ||
} |
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
Oops, something went wrong.