Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat#12 채팅방 도메인 구현 #13

Merged
merged 5 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.leets.team2.xclone.domain.chattingRoom.controller;

public class ChattingRoomController {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.leets.team2.xclone.domain.chattingRoom.dto;

import jakarta.validation.constraints.NotNull;
import lombok.Builder;

public class ChattingRoomDTO {

@Builder
public record Save(
@NotNull(message = "chatMemberTag는 필수 값입니다.")
String chatMemberTag
){}

@Builder
public record Response(
Long id,
String participantNickname,
String participantTag
){}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.leets.team2.xclone.domain.chattingRoom.entity;

import com.leets.team2.xclone.common.entity.AbstractEntity;
import com.leets.team2.xclone.domain.member.entities.Member;
import jakarta.persistence.*;

public class ChattingRoom extends AbstractEntity {
@ManyToOne
@JoinColumn(name = "member1_id")
private Member member1;


@ManyToOne
@JoinColumn(name = "member2_id")
private Member member2;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.leets.team2.xclone.domain.chattingRoom.repository;

import com.leets.team2.xclone.domain.member.entities.Member;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface ChattingRoomRepository extends JpaRepository<Member, Long> {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.leets.team2.xclone.domain.chattingRoom.service;

import com.leets.team2.xclone.domain.chattingRoom.repository.ChattingRoomRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class ChattingRoomService {
private final ChattingRoomRepository chattingRoomRepository;
}