-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat : 분실물 게시글 API 구현 #1170
feat : 분실물 게시글 API 구현 #1170
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
짧은 시간 내에 작업하시느라 정말 고생많으셨어요
코멘트 몇개만 확인부탁드립니다..!
|
||
@GetMapping("/lostitem") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A
정말정말 사소한거긴한데 두개 단어라서 하이픈으로 엮어주면 어떨까요? ex) "lost-item"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 이 생각 했어요!
@JsonNaming(value = SnakeCaseStrategy.class) | ||
|
||
public record LostItemArticleRequest( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A
공백 지워주세용
private Board( | ||
Integer id, | ||
String name, | ||
boolean isAnonymous, | ||
Integer articleCount, | ||
boolean isDeleted, | ||
boolean isNotice, | ||
Integer parentId | ||
) { | ||
this.id = id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A
DB에서 id를 결정하기 때문에 빌더에 id 속성을 안넣어도 되지 않나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
분실물 게시판 boardId
를 14
로 정해서 생성 부분 수정하다 놓친 것 같네요.
수정하겠습니다!
`author_id` INT UNSIGNED NULL comment '작성자 id', | ||
`category` VARCHAR(255) NOT NULL comment '분실물 카테고리', | ||
`found_place` VARCHAR(255) NOT NULL comment '습득 장소', | ||
`found_date` VARCHAR(255) NOT NULL comment '습득 날짜', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C
found_date
날짜 타입으로 변경해야할 것 같아요..!
@Schema(description = "분실물 사진") | ||
List<String> images, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A
이미지 url 인가요?
클라에서 자원 서버에 직접 저장하고 url만 넘겨주는 형태인건가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
맞습니다. s3에 저장후 접근할 수 있는 url을 서버로 전달해줍니다.
사용자가 이미지 등록 → 클라이언트는 presigned url을 생성받아 S3에 이미지를 등록
→ S3가 클라이언트에게 해당 이미지의 url을 응답 → 클라가 서버에게 전달
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다!
import in.koreatech.koin.domain.community.article.model.Article; | ||
import in.koreatech.koin.domain.community.article.model.LostItemArticle; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
사용 안하는 것 같아요!
@@ -14,6 +14,8 @@ | |||
import org.hibernate.annotations.Where; | |||
|
|||
import in.koreatech.koin.admin.notice.dto.AdminNoticeRequest; | |||
import in.koreatech.koin.domain.community.article.dto.LostItemArticleRequest; | |||
import in.koreatech.koin.domain.community.article.dto.LostItemArticlesRequest; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
18번째 줄 사용 안하는 것 같아요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import 부분은 리뷰에서 놓치기 쉬운데 예리한 지적 감사합니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다!
@Operation(summary = "분실물 게시글 등록") | ||
@PostMapping("/lostitem") | ||
ResponseEntity<Void> createLostItemArticle( | ||
@Auth(permit = {COUNCIL}) Integer councilId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요게 총학 @Auth
인가요??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 학생회라 COUNCIL로 정했습니다.
@ApiResponses( | ||
value = { | ||
@ApiResponse(responseCode = "200"), | ||
@ApiResponse(responseCode = "404", content = @Content(schema = @Schema(hidden = true))), | ||
} | ||
) | ||
@Operation(summary = "분실물 게시글 단건 조회") | ||
@GetMapping("/{id}") | ||
ResponseEntity<LostItemArticleResponse> getLostItemArticle( | ||
@Parameter(in = PATH) @PathVariable("id") Integer articleId | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Operation(summary = "게시글 단건 조회")
@GetMapping("/{id}")
ResponseEntity<ArticleResponse> getArticle(
@RequestParam(required = false) Integer boardId,
@Parameter(in = PATH) @PathVariable("id") Integer articleId,
@IpAddress String ipAddress
);
이 부분이랑 겹치는것 같은데 괜찮은가요??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
경로를 수정 안했네요! 감사합니다.
|
||
@GetMapping("/lostitem") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 이 생각 했어요!
🔥 연관 이슈
🚀 작업 내용
💬 리뷰 중점사항