Skip to content

Commit

Permalink
Merge pull request #31 from Modagbul/feat/archive-repeat
Browse files Browse the repository at this point in the history
미션 보드 관련 API
  • Loading branch information
minsu20 authored Oct 11, 2023
2 parents 7584f4b + eb8d2f0 commit 0ee6809
Show file tree
Hide file tree
Showing 110 changed files with 2,999 additions and 253 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ jobs:
echo "${{env.APPLICATION}}" > ./application.yml
touch ./firebase-key.json
echo "${{env.GOOGLE_APPLICATION_CREDENTIALS}}" | base64 --decode > ./firebase-key.json
touch ./data.sql
echo "${{env.DATA_SQL}}" | base64 --decode > ./data.sql
# 설정 파일을 작업공간에 저장
- uses: actions/upload-artifact@v2
with:
Expand All @@ -60,11 +58,6 @@ jobs:
name: firebase-key.json
path: ./src/main/resources/firebase-key.json

- uses: actions/upload-artifact@v2
with:
name: data.sql
path: ./src/main/resources/data.sql

# gradlew 권한 설정
- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand Down
18 changes: 3 additions & 15 deletions src/docs/asciidoc/Auth-API.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,24 @@
= Auth API

[[Auth-Kako-소셜-로그인]]
=== Auth Kakao 소셜 로그인 요청
=== Auth Kakao 소셜 로그인
operation::auth-controller-test/kakao_소셜_로그인_회원가입_전[snippets='http-request,request-fields']

=== Auth Kakao 소셜 로그인 회원가입 전 응답
operation::auth-controller-test/kakao_소셜_로그인_회원가입_전[snippets='http-response,response-fields']

=== Auth Kakao 소셜 로그인 회원가입 후 응답
operation::auth-controller-test/kakao_소셜_로그인_회원가입_후[snippets='http-response,response-fields']

---

[[Auth-Apple-소셜-로그인]]
=== Auth Apple 소셜 로그인 요청
=== Auth Apple 소셜 로그인
operation::auth-controller-test/apple_소셜_로그인_회원가입_전[snippets='http-request,request-fields']

=== Auth Apple 소셜 로그인 회원가입 전 응답
operation::auth-controller-test/apple_소셜_로그인_회원가입_전[snippets='http-response,response-fields']

=== Auth Apple 소셜 로그인 회원가입 후 응답
operation::auth-controller-test/apple_소셜_로그인_회원가입_후[snippets='http-response,response-fields']


[[Auth-Google-소셜-로그인]]
=== Auth Google 소셜 로그인 요청
=== Auth Google 소셜 로그인
operation::auth-controller-test/google_소셜_로그인_회원가입_전[snippets='http-request,request-fields']

=== Auth Google 소셜 로그인 회원가입 전 응답
operation::auth-controller-test/google_소셜_로그인_회원가입_전[snippets='http-response,response-fields']

=== Auth Google 소셜 로그인 회원가입 후 응답
operation::auth-controller-test/google_소셜_로그인_회원가입_후[snippets='http-response,response-fields']


Expand Down
27 changes: 27 additions & 0 deletions src/docs/asciidoc/Board-API.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[[Board-API]]
= Board API

[[Board-게시글-생성]]
=== Board 게시글 생성
operation::board-controller-test/create_board[snippets='http-request,path-parameters,request-fields,http-response,response-fields']
---

[[Board-게시글-수정]]
=== Board 게시글 수정
operation::board-controller-test/update_board[snippets='http-request,path-parameters,request-fields,http-response,response-fields']
---

[[Board-게시글-삭제]]
=== Board 게시글 삭제
operation::board-controller-test/delete_board[snippets='http-request,path-parameters,request-fields,response-fields']
---

[[Board-게시글-전체-조회]]
=== Board 게시글 전체 조회
operation::board-controller-test/get_board_all[snippets='http-request,path-parameters,http-response,response-fields']
---

[[Board-게시글-상제-조회]]
=== Board 게시글 상세 조회
operation::board-controller-test/get_board_detail[snippets='http-request,path-parameters,http-response,response-fields']
---
17 changes: 17 additions & 0 deletions src/docs/asciidoc/BoardComment_API.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[[Board-Comment-API]]
= Board Comment API

[[Board-Comment-댓글-생성]]
=== Board Comment 댓글 생성
operation::board-comment-controller-test/create_board_comment[snippets='http-request,path-parameters,request-fields,http-response,response-fields']
---

[[Board-Comment-댓글-삭제]]
=== Board Comment 댓글 삭제
operation::board-comment-controller-test/delete_board_comment[snippets='http-request,path-parameters,request-fields,response-fields']
---

[[Board-Comment-댓글-전체-조회]]
=== Board Comment 댓글 전체 조회
operation::board-comment-controller-test/get_board_comment_all[snippets='http-request,path-parameters,http-response,response-fields']
---
14 changes: 13 additions & 1 deletion src/docs/asciidoc/MissionArchive-API.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ operation::mission-archive-controller-test/미션_인증하기[snippets='http-re

[[MissionArchive-재인증하기]]
=== 미션 재인증하기
operation::mission-archive-controller-test/미션_재인증하기[snippets='http-request,path-parameters,request-fields,http-response,response-fields']
operation::mission-archive-controller-test/미션_재인증하기[snipipets='http-request,path-parameters,request-fields,http-response,response-fields']

---

Expand All @@ -27,3 +27,15 @@ operation::mission-archive-controller-test/모임원_미션_인증_조회[snippe

---

[[MissionArchive-인증성공인원조회]]
=== 인증 성공 인원 조회 ( n/n명 )
operation::mission-archive-controller-test/인증_성공_인원_조회[snippets='http-request,path-parameters,request-fields,http-response,response-fields']

---

[[MissionArchive-미션인증물좋아요]]
=== 미션 인증물 좋아요
operation::mission-archive-controller-test/미션_인증물_좋아요[snippets='http-request,path-parameters,request-fields,http-response,response-fields']

---

28 changes: 28 additions & 0 deletions src/docs/asciidoc/MissionBoard-API.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@


[[MissionBoard-API]]
= MissionBoard API

[[MissionBoard-단일미션인증조회]]
=== 단일 미션 인증 조회
operation::mission-board-controller-test/단일_미션_인증_조회[snippets='http-request,path-parameters,request-fields,http-response,response-fields']

---

[[MissionBoard-반복미션인증조회]]
=== 반복 미션 인증 조회
operation::mission-board-controller-test/반복 미션 인증 조회[snipipets='http-request,path-parameters,request-fields,http-response,response-fields']

---

[[MissionBoard-나의미션인증조회]]
=== 나의 미션 인증 조회
operation::mission-archive-controller-test/나의_미션_인증_조회[snippets='http-request,path-parameters,request-fields,http-response,response-fields']

---

[[MissionBoard-종료된인증조회]]
=== 종료된 인증 조회
operation::mission-board-controller-test/종료된_인증_조회[snippets='http-request,path-parameters,request-fields,http-response,response-fields']

---
46 changes: 42 additions & 4 deletions src/docs/asciidoc/Overview.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,53 @@
| `AU0003`
| 로그인할 때
| appId가 일치하지 않음 (유효하지 않음)

| `AU0004`
| 회원가입할 때
| 닉네임이 중복됨
|===

=== Team / Team_member ErrorCode
=== Team ErrorCode
|===
| ErrorCode | Scope | Description
| `TM0001`
| 팀 개설할 때
| 팀 최대 개수 3을 초과
| `T0001`
| API PATH에 teamId가 있을 때
| teamId가 유효하지 않음 (존재하지 않거나, 해당 유저가 그 팀에 속해있지 않거나)

| `T0002`
| 소모임을 수정, 삭제하려고 할 때
| 소모임장이 아님 (권한 없음)
|===

=== Board ErrorCode
|===
| ErrorCode | Scope | Description
| `B0001`
| API PATH에 boardId가 있을 때
| boardId가 유효하지 않음 (존재하지 않음)

| `B0002`
| 게시글을 수정, 삭제하려고 할 때
| 작성자가 아님 (권한 없음)
|===

=== Mission ErrorCode
|===
| ErrorCode | Scope | Description
| `M0001`
| 미션 생성할 때
| 소모임장이 아님

| `M0002`
| API PATH에 missionId가 있을 때
| missionId가 유효하지 않음
|===

=== MissionArchive ErrorCode
|===
| ErrorCode | Scope | Description
| `MA0001`
| 미션 인증물 조회할 때
| 미션 missionId 또는 teamId가 유효하지 않음
|===

6 changes: 3 additions & 3 deletions src/docs/asciidoc/Team-API.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ operation::team-controller-test/create_team[snippets='http-request,request-field

[[Team-소모임-가입]]
=== Team 소모임 가입
operation::team-controller-test/sign-in_team[snippets='http-request,http-response,response-fields']
operation::team-controller-test/sign-in_team[snippets='http-request,path-parameters,http-response,response-fields']


[[Team-소모임-조회]]
Expand All @@ -40,8 +40,8 @@ operation::team-controller-test/get_team[snippets='http-request,http-response,re

[[Team-소모임-강제종료]]
=== Team 소모임 강제종료
operation::team-controller-test/disband_team[snippets='http-request,http-response,response-fields']
operation::team-controller-test/disband_team[snippets='http-request,path-parameters,http-response,response-fields']

[[Team-소모임-탈퇴]]
=== Team 소모임원 강제종료
operation::team-controller-test/withdraw_team[snippets='http-request,http-response,response-fields']
operation::team-controller-test/withdraw_team[snippets='http-request,path-parameters,http-response,response-fields']
5 changes: 5 additions & 0 deletions src/docs/asciidoc/api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,9 @@ include::Mission-API.adoc[]

include::MissionArchive-API.adoc[]

include::MissionBoard-API.adoc[]

include::Board-API.adoc[]

include::BoardComment_API.adoc[]

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.moing.backend.domain.board.application.dto.request;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@AllArgsConstructor
@Builder
@NoArgsConstructor
@Getter
public class CreateBoardRequest {
@NotBlank(message = "title 을 입력해 주세요.")
@Size(min = 1, max = 15, message = "title 은 최소 1개, 최대 15개의 문자만 입력 가능합니다.")
private String title;

@NotBlank(message = "content 을 입력해 주세요.")
@Size(min = 1, max = 300, message = "content 은 최소 1개, 최대 10개의 문자만 입력 가능합니다.")
private String content;

@NotNull(message = "notice 사용 여부(isNotice) 를 입력해 주세요.")
private Boolean isNotice;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.moing.backend.domain.board.application.dto.request;

import lombok.Builder;
import lombok.Getter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Getter
@Builder
public class UpdateBoardRequest {
@NotBlank(message = "title 을 입력해 주세요.")
@Size(min = 1, max = 15, message = "title 은 최소 1개, 최대 15개의 문자만 입력 가능합니다.")
private String title;

@NotBlank(message = "content 을 입력해 주세요.")
@Size(min = 1, max = 300, message = "content 은 최소 1개, 최대 10개의 문자만 입력 가능합니다.")
private String content;

@NotNull(message = "notice 사용 여부(isNotice) 를 입력해 주세요.")
private Boolean isNotice;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package com.moing.backend.domain.board.application.dto.response;

import com.querydsl.core.annotations.QueryProjection;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;

@Getter
@Builder
@AllArgsConstructor
public class BoardBlocks {

private Long boardId;

private String writerNickName;

private Boolean writerIsLeader;

private String writerProfileImage;

private String title;

private String content;

private Integer commentNum;

private Boolean isRead;

@QueryProjection
public BoardBlocks(Long boardId, String writerNickName, Boolean writerIsLeader, String writerProfileImage, String title, String content, Integer commentNum) {
this.boardId = boardId;
this.writerNickName = writerNickName;
this.writerIsLeader = writerIsLeader;
this.writerProfileImage = writerProfileImage;
this.title = title;
this.content = content;
this.commentNum = commentNum;
this.isRead = false;
}

public void readBoard() {
this.isRead = true;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.moing.backend.domain.board.application.dto.response;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@Builder
@NoArgsConstructor
@Getter
public class CreateBoardResponse {
private Long boardId;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.moing.backend.domain.board.application.dto.response;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@AllArgsConstructor
@Builder
@NoArgsConstructor
@Getter
public class GetAllBoardResponse {
private int noticeNum;
private List<BoardBlocks> noticeBlocks=new ArrayList<>();
private int notNoticeNum;
private List<BoardBlocks> notNoticeBlocks=new ArrayList<>();
}
Loading

0 comments on commit 0ee6809

Please sign in to comment.