-
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
1 parent
094a0e4
commit f6a32e0
Showing
4 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
src/main/java/com/codepatissier/keki/chat/controller/ChatRoomController.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.codepatissier.keki.chat.controller; | ||
|
||
import io.swagger.v3.oas.annotations.security.SecurityRequirement; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@SecurityRequirement(name = "Bearer") | ||
@Tag(name = "chats", description = "상품 API") | ||
@RestController | ||
@RequestMapping(value = "/chats") | ||
@RequiredArgsConstructor | ||
public class ChatRoomController { | ||
} |
30 changes: 30 additions & 0 deletions
30
src/main/java/com/codepatissier/keki/chat/entity/ChatRoom.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.codepatissier.keki.chat.entity; | ||
|
||
|
||
import com.codepatissier.keki.common.BaseEntity; | ||
import com.codepatissier.keki.common.entityListener.DessertEntityListener; | ||
import com.codepatissier.keki.user.entity.User; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.hibernate.annotations.DynamicInsert; | ||
|
||
import javax.persistence.*; | ||
|
||
@Getter | ||
@Entity | ||
@NoArgsConstructor | ||
@DynamicInsert | ||
@EntityListeners(DessertEntityListener.class) | ||
public class ChatRoom extends BaseEntity { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long chatRoomIdx; | ||
|
||
@ManyToOne | ||
@JoinColumn(nullable = false, name = "storeUserIdx") | ||
private User store; | ||
|
||
@ManyToOne | ||
@JoinColumn(nullable = false, name = "userIdx") | ||
private User user; | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/java/com/codepatissier/keki/chat/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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.codepatissier.keki.chat.repository; | ||
|
||
import com.codepatissier.keki.chat.entity.ChatRoom; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface ChatRoomRepository extends JpaRepository<ChatRoom, Long> { | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/com/codepatissier/keki/chat/service/ChatService.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,7 @@ | ||
package com.codepatissier.keki.chat.service; | ||
|
||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
public class ChatService { | ||
} |