-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: DB 구조와 API docs를 참고한 공통 인터페이스 구현 및 적용 * refactor: PostCommentRequest 구현 * feat: api 스펙 변경에 맞춘 네이밍 변경 * feat: 프로필 사진 없을 때 기본 이미지 사용
- Loading branch information
Showing
32 changed files
with
238 additions
and
319 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
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 |
---|---|---|
@@ -1,134 +1,79 @@ | ||
import { Comment } from '@src/apis'; | ||
import { MEMBER, MEMBER_DESIGNER, MEMBER_PM } from '@mocks/data/member'; | ||
|
||
import Comment from '@src/types/Comment'; | ||
|
||
export const COMMENT: Comment = { | ||
commentId: 30, | ||
member: MEMBER, | ||
contents: 'Comment 10', | ||
likeAmount: 30, | ||
liked: false, | ||
}; | ||
|
||
export const COMMENT_LIKED: Comment = { | ||
commentId: 30, | ||
member: MEMBER, | ||
contents: 'Comment 10', | ||
likeAmount: 30, | ||
liked: true, | ||
}; | ||
|
||
export const COMMENTS: Comment[] = [ | ||
COMMENT, | ||
{ | ||
commentId: 30, | ||
member: { | ||
id: 3, | ||
name: 'MemberC', | ||
profileImage: null, | ||
jobCategory: 'product_manager', | ||
workingYears: 1, | ||
}, | ||
commentContent: 'Comment 10', | ||
likeAmount: 30, | ||
liked: false, | ||
}, | ||
{ | ||
...COMMENT, | ||
commentId: 29, | ||
member: { | ||
id: 2, | ||
name: 'MemberB', | ||
profileImage: null, | ||
jobCategory: 'Designer', | ||
workingYears: 5, | ||
}, | ||
commentContent: 'Comment 10', | ||
member: MEMBER_DESIGNER, | ||
contents: 'Comment 10', | ||
likeAmount: 29, | ||
liked: false, | ||
}, | ||
{ | ||
...COMMENT, | ||
commentId: 28, | ||
member: { | ||
id: 1, | ||
name: 'MemberA', | ||
profileImage: null, | ||
jobCategory: 'developer', | ||
workingYears: 3, | ||
}, | ||
commentContent: 'Comment 10', | ||
member: MEMBER_PM, | ||
contents: 'Comment 10', | ||
likeAmount: 28, | ||
liked: false, | ||
}, | ||
{ | ||
...COMMENT, | ||
commentId: 27, | ||
member: { | ||
id: 3, | ||
name: 'MemberC', | ||
profileImage: null, | ||
jobCategory: 'product_manager', | ||
workingYears: 1, | ||
}, | ||
commentContent: 'Comment 9', | ||
contents: 'Comment 9', | ||
likeAmount: 27, | ||
liked: false, | ||
}, | ||
{ | ||
...COMMENT, | ||
commentId: 26, | ||
member: { | ||
id: 2, | ||
name: 'MemberB', | ||
profileImage: null, | ||
jobCategory: 'Designer', | ||
workingYears: 5, | ||
}, | ||
commentContent: 'Comment 9', | ||
contents: 'Comment 9', | ||
likeAmount: 26, | ||
liked: false, | ||
}, | ||
{ | ||
...COMMENT, | ||
commentId: 25, | ||
member: { | ||
id: 1, | ||
name: 'MemberA', | ||
profileImage: null, | ||
jobCategory: 'developer', | ||
workingYears: 3, | ||
}, | ||
commentContent: 'Comment 9', | ||
contents: 'Comment 9', | ||
likeAmount: 25, | ||
liked: false, | ||
}, | ||
{ | ||
...COMMENT, | ||
commentId: 24, | ||
member: { | ||
id: 3, | ||
name: 'MemberC', | ||
profileImage: null, | ||
jobCategory: 'product_manager', | ||
workingYears: 1, | ||
}, | ||
commentContent: 'Comment 8', | ||
contents: 'Comment 8', | ||
likeAmount: 24, | ||
liked: false, | ||
}, | ||
{ | ||
...COMMENT, | ||
commentId: 23, | ||
member: { | ||
id: 2, | ||
name: 'MemberB', | ||
profileImage: null, | ||
jobCategory: 'Designer', | ||
workingYears: 5, | ||
}, | ||
commentContent: 'Comment 8', | ||
contents: 'Comment 8', | ||
likeAmount: 23, | ||
liked: false, | ||
}, | ||
{ | ||
...COMMENT, | ||
commentId: 22, | ||
member: { | ||
id: 1, | ||
name: 'MemberA', | ||
profileImage: null, | ||
jobCategory: 'developer', | ||
workingYears: 3, | ||
}, | ||
commentContent: 'Comment 8', | ||
contents: 'Comment 8', | ||
likeAmount: 22, | ||
liked: false, | ||
}, | ||
{ | ||
...COMMENT, | ||
commentId: 21, | ||
member: { | ||
id: 3, | ||
name: 'MemberC', | ||
profileImage: null, | ||
jobCategory: 'product_manager', | ||
workingYears: 1, | ||
}, | ||
commentContent: 'Comment 7', | ||
contents: 'Comment 7', | ||
likeAmount: 21, | ||
liked: false, | ||
}, | ||
]; |
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 |
---|---|---|
@@ -1,9 +1,25 @@ | ||
import { Member } from '@src/apis'; | ||
import Member from '@src/types/Member'; | ||
|
||
export const MEMBER: Member = { | ||
id: 4, | ||
name: 'MemberA', | ||
memberId: 4, | ||
nickname: 'Developer', | ||
profileImage: null, | ||
jobCategory: 'developer', | ||
workingYears: 3, | ||
}; | ||
|
||
export const MEMBER_DESIGNER: Member = { | ||
memberId: 2, | ||
nickname: 'Designer', | ||
profileImage: null, | ||
jobCategory: 'designer', | ||
workingYears: 5, | ||
}; | ||
|
||
export const MEMBER_PM: Member = { | ||
memberId: 2, | ||
nickname: 'PM', | ||
profileImage: null, | ||
jobCategory: 'product_manager', | ||
workingYears: 5, | ||
}; |
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 |
---|---|---|
@@ -1,37 +1,27 @@ | ||
import { Topic } from '@src/apis'; | ||
import { MEMBER } from '@mocks/data/member'; | ||
import { VOTE_OPTIONS } from '@mocks/data/voteOption'; | ||
|
||
import Topic from '@src/types/Topic'; | ||
|
||
export const TOPIC: Topic = { | ||
topicId: 1, | ||
title: 'Vote1', | ||
contents: 'Content1', | ||
member: { | ||
id: 4, | ||
name: 'MemberA', | ||
profileImage: null, | ||
jobCategory: 'developer', | ||
workingYears: 3, | ||
}, | ||
member: MEMBER, | ||
commentAmount: 2, | ||
voteAmount: 0, | ||
liked: false, | ||
likedAmount: 0, | ||
likeAmount: 0, | ||
tags: [], | ||
voteOptions: [ | ||
{ | ||
id: 1, | ||
text: 'Content1 OptionA', | ||
voteOptionImageFilename: null, | ||
codeBlock: null, | ||
voted: false, | ||
votedAmount: 1, | ||
}, | ||
{ | ||
id: 2, | ||
text: 'Content1 OptionB', | ||
voteOptionImageFilename: null, | ||
codeBlock: null, | ||
voted: false, | ||
votedAmount: 1, | ||
}, | ||
], | ||
voteOptions: VOTE_OPTIONS, | ||
}; | ||
|
||
export const TOPICS: Topic[] = [ | ||
{ ...TOPIC }, | ||
{ ...TOPIC, topicId: 1, title: '두번째' }, | ||
{ ...TOPIC, topicId: 2, title: '세번째' }, | ||
{ ...TOPIC, topicId: 3, title: '네번째' }, | ||
{ ...TOPIC, topicId: 4, title: '다섯번째' }, | ||
{ ...TOPIC, topicId: 5, title: '여섯번째' }, | ||
{ ...TOPIC, topicId: 6, title: '일곱번째' }, | ||
]; |
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
import VoteOption from '@src/types/VoteOption'; | ||
|
||
export const VOTE_OPTION: VoteOption = { | ||
voteOptionId: 1, | ||
text: 'Content1 OptionA', | ||
image: null, | ||
codeBlock: null, | ||
voted: false, | ||
voteAmount: 1, | ||
}; | ||
|
||
export const VOTE_OPTION2: VoteOption = { | ||
...VOTE_OPTION, | ||
voteOptionId: 2, | ||
text: 'Content1 OptionB', | ||
}; | ||
|
||
export const VOTE_OPTIONS: VoteOption[] = [VOTE_OPTION, VOTE_OPTION2]; |
Oops, something went wrong.