-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from jjuuuunnii/main
Feat: 서버 1차 구현 완료
- Loading branch information
Showing
13 changed files
with
127 additions
and
123 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
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
13 changes: 5 additions & 8 deletions
13
src/main/java/com/snowthon/snowman/dto/request/UserLoginDto.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,18 +1,15 @@ | ||
package com.snowthon.snowman.dto.request; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.Builder; | ||
|
||
@Builder | ||
public record UserLoginDto( | ||
|
||
@NotNull(message = "이메일은 빈값이 될 수 없습니다.") | ||
String email, | ||
|
||
@NotNull(message = "전화번호는 빈값이 될 수 없습니다.") | ||
String phoneNumber, | ||
|
||
@NotNull(message = "닉네임은 빈 값이 될 수 없습니다.") | ||
String nickname | ||
@NotNull(message = "providerId는 빈값이 될 수 없습니다.") | ||
@JsonProperty("providerId") @Schema(description = "프로바이더 아이디", example = "203912941") | ||
Long providerId | ||
) { | ||
} |
35 changes: 0 additions & 35 deletions
35
src/main/java/com/snowthon/snowman/dto/response/AchivingDetailDto.java
This file was deleted.
Oops, something went wrong.
113 changes: 97 additions & 16 deletions
113
src/main/java/com/snowthon/snowman/dto/response/ArchivingDto.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,29 +1,110 @@ | ||
package com.snowthon.snowman.dto.response; | ||
|
||
import com.snowthon.snowman.domain.wear.HeadWear; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.PropertyNamingStrategies; | ||
import com.fasterxml.jackson.databind.annotation.JsonNaming; | ||
import com.snowthon.snowman.domain.VoteHistory; | ||
import com.snowthon.snowman.dto.type.ESky; | ||
import com.snowthon.snowman.dto.type.wear.EHeadWear; | ||
import com.snowthon.snowman.dto.type.wear.ENeckWear; | ||
import com.snowthon.snowman.dto.type.wear.EOuterWear; | ||
import com.snowthon.snowman.dto.type.wear.ETopWear; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.List; | ||
|
||
@Builder | ||
public record ArchivingDto( | ||
@NotNull(message = "이름은 필수입니다.") | ||
Long id, | ||
@NotNull(message = "topWear은 필수입니다.") | ||
ETopWear topWear, | ||
@NotNull(message = "outerWear은 필수입니다.") | ||
EOuterWear outerWear, | ||
@NotNull(message = "headWear은 필수입니다.") | ||
EHeadWear headWear, | ||
@NotNull(message = "neckWear은 필수입니다.") | ||
ENeckWear neckWear, | ||
@NotNull(message = "voteTime은 필수입니다.") | ||
LocalDateTime voteTime | ||
) { | ||
@Getter | ||
@NoArgsConstructor(access = lombok.AccessLevel.PROTECTED) | ||
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) | ||
public class ArchivingDto{ | ||
|
||
@JsonProperty("voteHistoryList") @Schema(description = "투표 내역 리스트") | ||
private List<ArchivingDetailDto> voteHistoryList; | ||
|
||
@Getter | ||
@NoArgsConstructor(access = lombok.AccessLevel.PROTECTED) | ||
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) | ||
public static class ArchivingDetailDto { | ||
@JsonProperty("archive_id") @Schema(description = "아카이브 아이디", example = "1") | ||
@NotNull(message = "이름은 필수입니다.") | ||
private Long archiveId; | ||
|
||
@JsonProperty("topWear") @Schema(description = "상의 정보", example = "LONG_SLEEVE") | ||
@NotNull(message = "topWear는 필수입니다.") | ||
private ETopWear topWear; | ||
|
||
@JsonProperty("outerWear") @Schema(description = "아우터 정보", example = "COAT") | ||
@NotNull(message = "outerWear는 필수입니다.") | ||
private EOuterWear outerWear; | ||
|
||
@JsonProperty("headWear") @Schema(description = "모자 정보", example = "EAR_MUFFS") | ||
@NotNull(message = "headWear는 필수입니다.") | ||
private EHeadWear headWear; | ||
|
||
@JsonProperty("neckWear") @Schema(description = "목도리 정보", example = "SCARF") | ||
@NotNull(message = "neckWear는 필수입니다.") | ||
private ENeckWear neckWear; | ||
|
||
@JsonProperty("weatherStatus") @Schema(description = "날씨 정보", example = "SNOW") | ||
@NotNull(message = "날씨 정보는 필수입니다.") | ||
private ESky weatherStatus; | ||
|
||
@JsonProperty("temperature") @Schema(description = "온도", example = "10") | ||
@NotNull(message = "temperature는 필수입니다.") | ||
private int temperature; | ||
|
||
@JsonProperty("location") @Schema(description = "위치", example = "서울특별시 중구 명동") | ||
@NotNull(message = "location는 필수입니다.") | ||
private String location; | ||
|
||
@JsonProperty("voteTime") @Schema(description = "투표 시간", example = "2021-10-10T10:10:10") | ||
@NotNull(message = "voteTime는 필수입니다.") | ||
private LocalDateTime voteTime; | ||
|
||
@Builder | ||
public ArchivingDetailDto(Long archiveId, ETopWear topWear, EOuterWear outerWear, EHeadWear headWear, ENeckWear neckWear, ESky weatherStatus, int temperature, String location, LocalDateTime voteTime) { | ||
this.archiveId = archiveId; | ||
this.topWear = topWear; | ||
this.outerWear = outerWear; | ||
this.headWear = headWear; | ||
this.neckWear = neckWear; | ||
this.weatherStatus = weatherStatus; | ||
this.temperature = temperature; | ||
this.location = location; | ||
this.voteTime = voteTime; | ||
} | ||
|
||
public static ArchivingDetailDto fromEntity(VoteHistory voteHistory) { | ||
return ArchivingDetailDto.builder() | ||
.archiveId(voteHistory.getId()) | ||
.topWear(voteHistory.getTopWear()) | ||
.outerWear(voteHistory.getOuter()) | ||
.headWear(voteHistory.getHeadWear()) | ||
.neckWear(voteHistory.getNeckWear()) | ||
.weatherStatus(voteHistory.getSky()) | ||
.temperature(voteHistory.getTemperature()) | ||
.location(voteHistory.getLocation()) | ||
.voteTime(voteHistory.getVoteTime()) | ||
.build(); | ||
} | ||
} | ||
|
||
@Builder | ||
public ArchivingDto(List<ArchivingDetailDto> voteHistoryList) { | ||
this.voteHistoryList = voteHistoryList; | ||
} | ||
|
||
public static ArchivingDto fromEntity(List<ArchivingDetailDto> voteHistoryList) { | ||
return ArchivingDto.builder() | ||
.voteHistoryList(voteHistoryList) | ||
.build(); | ||
} | ||
} | ||
|
||
|
||
|
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