Skip to content

Commit

Permalink
채팅 도메인 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
jj0526 committed Oct 8, 2024
1 parent 01c4f48 commit 0bcc9d6
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 0 deletions.
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,9 @@
package com.leets.team2.xclone.domain.chattingRoom.dto;

import jakarta.validation.constraints.NotBlank;

public class RequestChattingRoomDTO {
@NotBlank
private String chatMemberTag;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.leets.team2.xclone.domain.chattingRoom.dto;

import jakarta.validation.constraints.NotBlank;

public class ResponseChattingRoomDTO {
private Long id;

@NotBlank
private String participantNickname;

@NotBlank
private String participantTag;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
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 {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "chatting_room_id")
private Long id;

@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;
}

0 comments on commit 0bcc9d6

Please sign in to comment.