-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 입장 알림, 메시지 전송 기능 (유저 이름x) (#112)
- Loading branch information
Showing
10 changed files
with
96 additions
and
46 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
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 was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
src/main/java/shop/fevertime/backend/dto/request/ChatRoomRequestDto.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 shop.fevertime.backend.dto.request; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
public class ChatRoomRequestDto { | ||
private String name; | ||
|
||
public ChatRoomRequestDto(String name) { | ||
this.name = name; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/shop/fevertime/backend/dto/response/ChatRoomResponseDto.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,24 @@ | ||
package shop.fevertime.backend.dto.response; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import shop.fevertime.backend.domain.ChatRoom; | ||
|
||
import java.time.format.DateTimeFormatter; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
public class ChatRoomResponseDto { | ||
private Long roomId; | ||
private String name; | ||
private String createdDate; | ||
|
||
public ChatRoomResponseDto(ChatRoom chatRoom) { | ||
this.roomId = chatRoom.getId(); | ||
this.name= chatRoom.getName(); | ||
this.createdDate = chatRoom.getCreatedDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));; | ||
} | ||
|
||
} |
2 changes: 0 additions & 2 deletions
2
src/main/java/shop/fevertime/backend/repository/ChatRoomRepository.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,11 +1,9 @@ | ||
package shop.fevertime.backend.repository; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
import shop.fevertime.backend.domain.ChatRoom; | ||
import shop.fevertime.backend.domain.User; | ||
|
||
@Repository | ||
public interface ChatRoomRepository extends JpaRepository<ChatRoom, Long> { | ||
ChatRoom findByIdAndUser(Long roomId, User user); | ||
} |
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