-
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 #129 from My-Own-Weapon/develop
[FEAT]/#-LiveRoomParticipant 부분 추가, 및 openvidu 수정
- Loading branch information
Showing
6 changed files
with
195 additions
and
25 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
30 changes: 30 additions & 0 deletions
30
src/main/java/com/chimaera/wagubook/entity/LiveRoomParticipant.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,30 @@ | ||
package com.chimaera.wagubook.entity; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = lombok.AccessLevel.PROTECTED) | ||
@Builder(builderMethodName = "newBuilder") | ||
@AllArgsConstructor(access = lombok.AccessLevel.PRIVATE) | ||
public class LiveRoomParticipant { | ||
|
||
@Id | ||
@GeneratedValue(strategy = jakarta.persistence.GenerationType.AUTO) | ||
@Column(name = "live_room_participant_id") | ||
private Long id; | ||
|
||
private String sessionId; // 라이브 스트리밍 세션 ID | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "member_id") | ||
private Member member; // 라이브 스트리밍 참여자 | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "live_room_id") | ||
private LiveRoom liveRoom; // 라이브 스트리밍 룸 | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/com/chimaera/wagubook/repository/liveRoom/LiveRoomParticipantRepository.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,13 @@ | ||
package com.chimaera.wagubook.repository.liveRoom; | ||
|
||
import com.chimaera.wagubook.entity.LiveRoomParticipant; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
import java.util.List; | ||
|
||
public interface LiveRoomParticipantRepository extends JpaRepository<LiveRoomParticipant, Long> { | ||
void deleteBySessionId(String sessionId); | ||
LiveRoomParticipant findByMemberId(Long memberId); | ||
void deleteByMemberId(Long memberId); | ||
List<LiveRoomParticipant> findBySessionId(String sessionId); | ||
} |
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