-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#9 feat:모든 엔티티 BaseEntity 상속 / fix: User.status-> userStatus로 변수명 수정/…
… feat: Board수정 api 구현 및 호스트 판별 validation 추가
- Loading branch information
Showing
21 changed files
with
197 additions
and
29 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
75 changes: 75 additions & 0 deletions
75
server/src/main/java/com/yogit/server/board/dto/request/PatchBoardReq.java
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,75 @@ | ||
package com.yogit.server.board.dto.request; | ||
|
||
import com.fasterxml.jackson.annotation.JsonFormat; | ||
import io.swagger.annotations.ApiModelProperty; | ||
import io.swagger.annotations.ApiParam; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.validation.constraints.NotBlank; | ||
import javax.validation.constraints.Size; | ||
import java.time.LocalDateTime; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
public class PatchBoardReq { | ||
|
||
@ApiModelProperty(example = "1") | ||
@ApiParam(value = "Board ID", required = true) | ||
private Long boardId; | ||
|
||
@ApiModelProperty(example = "1") | ||
@ApiParam(value = "도시 ID", required = true) | ||
private Long cityId; | ||
|
||
@ApiModelProperty(example = "1") | ||
@ApiParam(value = "호스트 ID", required = true) | ||
private Long hostId; | ||
|
||
@ApiModelProperty(example = "경복궁 탐사입니다.") | ||
@ApiParam(value = "게시글 제목", required = true) | ||
@Size(min = 1, max=51) | ||
@NotBlank | ||
private String title; | ||
|
||
@ApiModelProperty(example = "서울특별시 종로구 사직로 130") | ||
@ApiParam(value = "모임 주소", required = true) | ||
@NotBlank | ||
private String address; | ||
|
||
@ApiModelProperty(example = "37.1") | ||
@ApiParam(value = "위도", required = true) | ||
private float longitute; | ||
|
||
@ApiModelProperty(example = "37") | ||
@ApiParam(value = "경도", required = true) | ||
private float latitude; | ||
|
||
@ApiModelProperty(example = "2022-07-13 16:29:30") | ||
@ApiParam(value = "사용자 ID", required = true) | ||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Seoul") | ||
private LocalDateTime date; // 모임 시각 | ||
|
||
@ApiModelProperty(example = "시간에 맞춰오시기 바랍니다.") | ||
@ApiParam(value = "모임 공지사항", required = false) | ||
@Size(max = 1000) | ||
private String notice; | ||
|
||
@ApiModelProperty(example = "3시에 모여서 경복궁역에서 경복궁으로 출발합니다.") | ||
@ApiParam(value = "모임 상세설명", required = false) | ||
@Size(max = 1000) | ||
private String introduction; // 게시글 내용 상세설명 | ||
|
||
@ApiModelProperty(example = "활발한 사람이 오면 좋습니다.") | ||
@ApiParam(value = "원하는 사람 설명", required = false) | ||
@Size(max = 1000) | ||
private String kindOfPerson; // 이런 사람을 원합니다 설명 글. | ||
|
||
@ApiModelProperty(example = "5") | ||
@ApiParam(value = "총 인원수", required = true) | ||
private int totalMember; | ||
|
||
@ApiModelProperty(example = "1") | ||
@ApiParam(value = "그룹 카테고리 ID", required = false) | ||
private Long categoryId; | ||
} |
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
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
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
8 changes: 8 additions & 0 deletions
8
server/src/main/java/com/yogit/server/board/exception/NotHostOfBoardExcepion.java
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,8 @@ | ||
package com.yogit.server.board.exception; | ||
|
||
public class NotHostOfBoardExcepion extends BoardException{ | ||
|
||
public NotHostOfBoardExcepion(){ | ||
super(BoardExceptionList.NOT_HOST_OF_BOARD.getCODE(), BoardExceptionList.NOT_HOST_OF_BOARD.getHTTPSTATUS(), BoardExceptionList.NOT_HOST_OF_BOARD.getMESSAGE()); | ||
} | ||
} |
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
3 changes: 3 additions & 0 deletions
3
server/src/main/java/com/yogit/server/board/service/BoardService.java
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,10 +1,13 @@ | ||
package com.yogit.server.board.service; | ||
|
||
import com.yogit.server.board.dto.request.CreateBoardReq; | ||
import com.yogit.server.board.dto.request.PatchBoardReq; | ||
import com.yogit.server.board.dto.response.BoardRes; | ||
import com.yogit.server.global.dto.ApplicationResponse; | ||
|
||
public interface BoardService { | ||
|
||
ApplicationResponse<BoardRes> createBoard(CreateBoardReq createBoardReq); | ||
|
||
ApplicationResponse<BoardRes> updateBoard(PatchBoardReq patchBoardReq); | ||
} |
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
Oops, something went wrong.