-
Notifications
You must be signed in to change notification settings - Fork 1
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 #91 from DEPthes/develop
V.3.0.0 Deploy
- Loading branch information
Showing
26 changed files
with
344 additions
and
101 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package mvp.deplog.domain.member; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import mvp.deplog.domain.member.domain.Part; | ||
import mvp.deplog.domain.member.dto.Avatar; | ||
|
||
@Data | ||
@Builder | ||
public class WriterInfo { | ||
|
||
@Schema(type = "Avatar", description = "작성자의 아바타 이미지 객체입니다.") | ||
private Avatar avatar; | ||
|
||
@Schema(type = "String", example = "홍길동", description = "작성자의 이름입니다.") | ||
private String name; | ||
|
||
@Schema(type = "Integer", example = "3", description = "작성자의 기수입니다.") | ||
private Integer generation; | ||
|
||
@Schema(type = "Enum(Part)", example = "SERVER", description = "작성자의 파트입니다.", allowableValues = {"PLAN", "DESIGN", "ANDROID", "WEB", "SERVER"}) | ||
private Part part; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package mvp.deplog.domain.member.dto; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
@Data | ||
@Builder | ||
public class Avatar { | ||
|
||
@Schema(type = "String", example = "face1", description = "아바타 얼굴 파일명입니다.") | ||
private String avatarFace; | ||
|
||
@Schema(type = "String", example = "body1", description = "아바타 몸통 파일명입니다.") | ||
private String avatarBody; | ||
|
||
@Schema(type = "String", example = "eyes1", description = "아바타 눈 파일명입니다.") | ||
private String avatarEyes; | ||
|
||
@Schema(type = "String", example = "nose1", description = "아바타 코 파일명입니다.") | ||
private String avatarNose; | ||
|
||
@Schema(type = "String", example = "mouth1", description = "아바타 입 파일명입니다.") | ||
private String avatarMouth; | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/mvp/deplog/domain/member/dto/mapper/MemberMapper.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,15 +1,33 @@ | ||
package mvp.deplog.domain.member.dto.mapper; | ||
|
||
import mvp.deplog.domain.member.domain.Member; | ||
import mvp.deplog.domain.member.dto.Avatar; | ||
import mvp.deplog.domain.member.dto.response.MyInfoRes; | ||
import org.mapstruct.Mapper; | ||
import org.mapstruct.Mapping; | ||
import org.mapstruct.Named; | ||
import org.mapstruct.ReportingPolicy; | ||
|
||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) | ||
public interface MemberMapper { | ||
|
||
@Mapping(source = "id", target = "memberId") | ||
@Mapping(source = "name", target = "memberName") | ||
@Mapping(source = "member", target = "avatar", qualifiedByName = "mapToAvatar") | ||
MyInfoRes memberToMyInfo(Member member); | ||
|
||
@Named("mapToAvatar") | ||
default Avatar mapToAvatar(Member member) { | ||
if (member == null) { | ||
return null; | ||
} | ||
|
||
return Avatar.builder() | ||
.avatarFace(member.getAvatarFace()) | ||
.avatarBody(member.getAvatarBody()) | ||
.avatarEyes(member.getAvatarEyes()) | ||
.avatarNose(member.getAvatarNose()) | ||
.avatarMouth(member.getAvatarMouth()) | ||
.build(); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/mvp/deplog/domain/member/dto/request/ModifyAvatarReq.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,23 @@ | ||
package mvp.deplog.domain.member.dto.request; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Data; | ||
|
||
@Data | ||
public class ModifyAvatarReq { | ||
|
||
@Schema(type = "String", example = "face1", description = "아바타 얼굴 파일명입니다.") | ||
private String avatarFace; | ||
|
||
@Schema(type = "String", example = "body1", description = "아바타 몸통 파일명입니다.") | ||
private String avatarBody; | ||
|
||
@Schema(type = "String", example = "eyes1", description = "아바타 눈 파일명입니다.") | ||
private String avatarEyes; | ||
|
||
@Schema(type = "String", example = "nose1", description = "아바타 코 파일명입니다.") | ||
private String avatarNose; | ||
|
||
@Schema(type = "String", example = "mouth1", description = "아바타 입 파일명입니다.") | ||
private String avatarMouth; | ||
} |
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
Oops, something went wrong.