-
Notifications
You must be signed in to change notification settings - Fork 2
프론트랑 통신 내용
hyeonic edited this page May 5, 2021
·
2 revisions
- 질의응답 게시판을 담당하는 질문 관련 도메인
-> request
{
data: {
targetUserId: (Long targetUserId),
writerUserId: (Long writerUserId),
title: (String title),
content: (String content),
status: (Boolean true or false),
fix: (Boolean true or false)
}
}
------------------------------------------------------------------------------------------------------------------------------
-> success response
{
data: {
id: (Long questionId),
targetUser: {
id: (Long userId),
email: (String email),
name: (String name)
},
writerUser: {
id: (Long userId),
email: (String email),
name: (String name)
},
title: (String title),
content: (String content),
status: (Boolean true or false),
fix: (Boolean true or false),
view: (Integer view),
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
}
}
------------------------------------------------------------------------------------------------------------------------------
-> fail response (존재하지 않는 user 일 때)
{
errorMessage: 해당 user 가 존재하지 않습니다. id=(Long user),
errorCode: 404
}
-> success response
{
data: {
id: (Long questionId),
targetUser: {
id: (Long userId),
email: (String email),
name: (String name)
},
writerUser: {
id: (Long userId),
email: (String email),
name: (String name)
},
title: (String title),
content: (String content),
status: (Boolean true or false),
fix: (Boolean true or false),
view: (Integer view),
comments: [
{
id: (Long commentId),
questionId: (Long questionId),
writerUser: {
id: (Long userId),
email: (String email),
name: (String name)
},
content: (String content),
children: [
{
id: (Long commentId),
questionId: (Long questionId),
writerUser: {
id: (Long userId),
email: (String email),
name: (String name)
},
content: (String content),
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
},
{...},
...
],
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
},
{...},
...
],
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
}
}
------------------------------------------------------------------------------------------------------------------------------
-> fail response (존재하지 않는 question 일 때)
{
errorMessage: 해당 question 이 존재하지 않습니다. id=(Long question),
errorCode: 404
}
-> response
{
data: [
{
id: (Long questionId),
targetUser: {
id: (Long userId),
email: (String email),
name: (String name)
},
writerUser: {
id: (Long userId),
email: (String email),
name: (String name)
},
title: (String title),
content: (String content),
status: (Boolean true or false),
fix: (Boolean true or false),
view: (Integer view),
comments: [
{
id: (Long commentId),
questionId: (Long questionId),
writerUser: {
id: (Long userId),
email: (String email),
name: (String name)
},
content: (String content),
children: [
{
id: (Long commentId),
questionId: (Long questionId),
writerUser: {
id: (Long userId),
email: (String email),
name: (String name)
},
content: (String content),
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
},
{...},
...
],
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
},
{...},
...
],
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
},
{...},
...
]
}
------------------------------------------------------------------------------------------------------------------------------
-> fail response (존재하지 않는 user 일 때)
{
errorMessage: 해당 user 가 존재하지 않습니다. id=(Long user),
errorCode: 404
}
-> request
{
data: {
targetUserId: (Long targetUserId),
writerUserId: (Long writerUserId),
title: (String title),
content: (String content),
status: (Boolean true or false),
fix: (Boolean true or false)
}
}
------------------------------------------------------------------------------------------------------------------------------
-> response
{
data: {
id: (Long questionId),
targetUser: {
id: (Long userId),
email: (String email),
name: (String name)
},
writerUser: {
id: (Long userId),
email: (String email),
name: (String name)
},
title: (String title),
content: (String content),
status: (Boolean true or false),
fix: (Boolean true or false),
view: (Integer view),
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
}
}
-> response void
-> response
{
data: 1 게시물의 조회수가 증가하였습니다.,
count: 1
}
- 질의응답 게시판 각 게시글에 들어가는 댓글 및 대댓글 관련 도메인
-> request
{
data: {
questionId: (Long questionId),
writerUserId: (Long writerUserId),
content: (String content),
parentId: (Long parentId or null)
}
}
------------------------------------------------------------------------------------------------------------------------------
-> response
{
data: {
id: (Long commentId),
questionId: (Long questionId),
writerUser: {
id: (Long userId),
email: (String email),
name: (String name)
},
content: (String content),
parentId:(Long parentId or null),
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
}
}
-> response
{
data: {
id: (Long commentId),
questionId: (Long questionId),
writerUser: {
email: (String email),
name: (String name)
},
content: (String content),
children: [
{
id: (Long commentId),
questionId: (Long questionId),
writerUser: {
email: (String email),
name: (String name)
},
content: (String content),
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
},
{
id: (Long commentId),
questionId: (Long questionId),
writerUser: {
email: (String email),
name: (String name)
},
content: (String content),
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
},
{
id: (Long commentId),
questionId: (Long questionId),
writerUser: {
email: (String email),
name: (String name)
},
content: (String content),
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
}
...
],
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
}
}
-> response
{
data: [
{
id: (Long commentId),
questionId: (Long questionId),
writerUser: {
email: (String email),
name: (String name)
},
content: (String content),
children: [
{
id: (Long commentId),
questionId: (Long questionId),
writerUser: {
email: (String email),
name: (String name)
},
content: (String content),
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
},
{...},
...
],
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
},
{...},
...
]
}
-> request
{
data: {
questionId: (Long questionId),
writerUserId: (Long writerUserId),
content: (String content),
parentId: (Long parentId or null)
}
}
-> response
{
data: {
id: (Long commentId),
questionId: (Long questionId),
writerUser: {
id: (Long userId),
email: (String email),
name: (String name)
},
content: (String content),
parentId:(Long parentId or null),
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
}
}
-> response void
-> request
{
data: {
userId: (Long userId),
profileImageUrl: (우선 공백 추후 추가예정),
content: (String content)
}
}
------------------------------------------------------------------------------------------------------------------------------
-> response
{
data: {
id: (Long blogId),
user: {
id: (Long userId),
email: (String email),
name: (String name)
},
profileImageUrl: (우선 공백 추후 추가예정),
content: (String content),
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
}
}
{
data: {
id: (Long blogId),
user: {
id: (Long userId),
email: (String email),
name: (String name)
},
profileImageUrl: (우선 공백 추후 추가예정),
content: (String content),
posts: [
{
id: (Long postId),
blogId: (Long blogId),
user: {
id: (Long userId),
email: (String email),
name: (String name)
},
title: (String title),
content: (String content),
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
},
{...},
...
]
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
}
}
{
data: [
{
id: (Long blogId),
user: {
id: (Long userId),
email: (String email),
name: (String name)
},
profileImageUrl: (우선 공백 추후 추가예정),
content: (String content),
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
},
{...},
...
]
}
-> request
{
data: {
userId: (Long userId),
profileImageUrl: (우선 공백 추후 추가예정),
content: (String content)
}
}
------------------------------------------------------------------------------------------------------------------------------
-> response
{
data: {
id: (Long blogId),
user: {
id: (Long userId),
email: (String email),
name: (String name)
},
profileImageUrl: (우선 공백 추후 추가예정),
content: (String content),
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
}
}
-> response void
-> request
{
data: {
blogId: (Long blogId),
title: (String title),
content: (String content)
}
}
------------------------------------------------------------------------------------------------------------------------------
-> response
{
data: {
id: (Long postId),
blogId: (Long blogId),
user: {
id: (Long userId),
email: (String email),
name: (String name)
},
title: (String title),
content: (String content),
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
}
}
{
data: {
id: (Long postId),
blogId: (Long blogId),
user: {
id: (Long userId),
email: (String email),
name: (String name)
},
title: (String title),
content: (String content),
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
}
}
-> request
{
data: {
blogId: (Long blogId),
title: (String title),
content: (String content)
}
}
------------------------------------------------------------------------------------------------------------------------------
-> response
{
data: {
id: (Long postId),
blogId: (Long blogId),
user: {
id: (Long userId),
email: (String email),
name: (String name)
},
title: (String title),
content: (String content),
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
}
}
-> response void
- user를 follow 한 명단 관리
-> request
{
data: {
userId: (Long userId);
}
}
------------------------------------------------------------------------------------------------------------------------------
-> response
{
data: {
id: (Long followId),
userId: (Long userId),
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
}
}
{
data: [
{
id: (Long followId),
userId: (Long userId),
createdDate: (LocalDateTime createdDate),
lastModifiedDate: (LocalDateTime lastModifiedDate)
},
{...},
...
],
count: (Integer count) // follow 명 수
}
-> response void
-> response void