-
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.
- Loading branch information
Showing
3 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
src/main/java/com/promise8/wwwbe/controller/v2/V2MeetingController.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,40 @@ | ||
package com.promise8.wwwbe.controller.v2; | ||
|
||
import com.promise8.wwwbe.config.security.UserPrincipal; | ||
import com.promise8.wwwbe.model.v1.dto.req.MeetingCreateReqDtoV1; | ||
import com.promise8.wwwbe.model.v1.dto.res.MeetingGetResDtoV1; | ||
import com.promise8.wwwbe.model.v1.http.BaseResponse; | ||
import com.promise8.wwwbe.service.MeetingService; | ||
import io.swagger.annotations.Api; | ||
import io.swagger.annotations.ApiOperation; | ||
import io.swagger.annotations.ApiResponse; | ||
import io.swagger.annotations.ApiResponses; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.security.core.annotation.AuthenticationPrincipal; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
@RequestMapping("/api/v2/meetings") | ||
@RequiredArgsConstructor | ||
@Api(value = "MeetingController", tags = "MeetingController", description = "약속 방과 관련된 모든 api를 제공한다.") | ||
public class V2MeetingController { | ||
private final MeetingService meetingService; | ||
|
||
@ApiOperation(value = "약속방 생성", notes = "약속방을 생성한다.") | ||
@ApiResponses({ | ||
@ApiResponse(code = 0, message = "생성 완료"), | ||
@ApiResponse(code = 403, message = "접근 거부"), | ||
@ApiResponse(code = 500, message = "서버 에러 발생"), | ||
@ApiResponse(code = 1000, message = "서버 에러 발생") | ||
}) | ||
@PostMapping | ||
public BaseResponse<MeetingGetResDtoV1> createMeeting( | ||
@AuthenticationPrincipal UserPrincipal userPrincipal, | ||
@RequestBody MeetingCreateReqDtoV1 meetingCreateReqDto) { | ||
|
||
return BaseResponse.ok(); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/com/promise8/wwwbe/model/v2/dto/res/ConfirmedPromise.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,24 @@ | ||
package com.promise8.wwwbe.model.v2.dto.res; | ||
|
||
import com.promise8.wwwbe.model.v1.dto.PromiseDayOfWeek; | ||
import com.promise8.wwwbe.model.v1.dto.PromiseTime; | ||
import io.swagger.annotations.ApiModelProperty; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import java.time.LocalDate; | ||
|
||
@Setter | ||
@Getter | ||
@Builder | ||
public class ConfirmedPromise { | ||
@ApiModelProperty(value = "confirmedDate", notes = "확정된 날짜") | ||
private LocalDate promiseDate; | ||
@ApiModelProperty(value = "confirmedDayOfWeek", notes = "요일") | ||
private PromiseDayOfWeek promiseDayOfWeek; | ||
@ApiModelProperty(value = "confirmedTime", notes = "확정된 시간대") | ||
private PromiseTime promiseTime; | ||
@ApiModelProperty(value = "confirmedPlace", notes = "확정된 장소") | ||
private String promisePlace; | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/java/com/promise8/wwwbe/model/v2/dto/res/MeetingGetResDtoV2.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,22 @@ | ||
package com.promise8.wwwbe.model.v2.dto.res; | ||
|
||
import io.swagger.annotations.ApiModel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Setter | ||
@Getter | ||
@Builder | ||
@ApiModel(value = "MeetingDetail", description = "약속방 내의 필요한 정보를 모두 담는다.") | ||
public class MeetingGetResDtoV2 { | ||
private Long meetingId; | ||
private String meetingName; | ||
private int minimumAlertMembers; | ||
private String currentUserName; | ||
private Boolean isHost; | ||
private int joinedCount; | ||
private int votingCount; | ||
private String meetingCode; | ||
private String shortLink; | ||
} |