-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Comment: comment api type 설정 (1차 작업)
- Loading branch information
1 parent
b2063bb
commit c906c6d
Showing
1 changed file
with
41 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,48 @@ | ||
// 임시 API | ||
|
||
export interface CommentRequest { | ||
export interface GetCommentRequest { | ||
id: string; | ||
} | ||
|
||
export interface CommentResponse { | ||
id: string; | ||
name: string; | ||
text: string; | ||
export interface GetCommentResponse { | ||
code: number; | ||
message: string; | ||
data: { | ||
id: number; | ||
content: string; | ||
}; | ||
} | ||
|
||
//put | ||
export interface PutCommentRequest { | ||
id: number; | ||
} | ||
|
||
//delete | ||
export interface DeleteCommentRequest { | ||
id: number; | ||
} | ||
|
||
export interface DeleteCommentResponse { | ||
code: number; | ||
message: string; | ||
data: object; | ||
} | ||
|
||
//GetAllComment | ||
export interface AllGetCommentResponse { | ||
code: number; | ||
message: string; | ||
data: CommentData[]; | ||
} | ||
|
||
export interface CommentData { | ||
id: number; | ||
comment: string; | ||
} | ||
|
||
//Post | ||
|
||
export interface CommentClient { | ||
getComment(): Promise<CommentResponse>; | ||
getComment(request: GetCommentRequest): Promise<GetCommentResponse>; | ||
delete(request: DeleteCommentRequest): Promise<DeleteCommentResponse>; | ||
getAllComment(): Promise<AllGetCommentResponse>; | ||
} |