-
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
6 changed files
with
115 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
...i/src/main/java/com/gt/genti/picturegeneraterequest/command/AdvancedPGREQSaveCommand.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,27 @@ | ||
package com.gt.genti.picturegeneraterequest.command; | ||
|
||
import com.gt.genti.picture.PictureRatio; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class AdvancedPGREQSaveCommand extends PGREQSaveCommand { | ||
|
||
List<String> otherFacePictureKeyList; | ||
|
||
@Builder(builderMethodName = "advancedBuilder") | ||
public AdvancedPGREQSaveCommand(String prompt, | ||
List<String> facePictureKeyList, | ||
List<String> otherFacePictureKeyList, | ||
PictureRatio pictureRatio) { | ||
this.prompt = prompt; | ||
this.facePictureKeyList = facePictureKeyList; | ||
this.otherFacePictureKeyList = otherFacePictureKeyList; | ||
this.pictureRatio = pictureRatio; | ||
} | ||
} |
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
33 changes: 33 additions & 0 deletions
33
...ain/java/com/gt/genti/picturegeneraterequest/dto/request/AdvancedPGREQSaveRequestDto.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,33 @@ | ||
package com.gt.genti.picturegeneraterequest.dto.request; | ||
|
||
import com.gt.genti.picture.dto.request.CommonPictureKeyUpdateRequestDto; | ||
import com.gt.genti.picturegeneraterequest.command.AdvancedPGREQSaveCommand; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotNull; | ||
import jakarta.validation.constraints.Size; | ||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Schema(name = "[PGREQ][User] 2인 사진생성요청 생성 dto") | ||
public class AdvancedPGREQSaveRequestDto extends PGREQSaveRequestDto { | ||
|
||
@NotNull | ||
@Size(max = 3, min = 1, message = "사용자의 얼굴 사진 개수는 최소 1개, 최대 3개입니다.") | ||
@Schema(description = "추가 인원의 얼굴 사진 리스트") | ||
List<@NotNull CommonPictureKeyUpdateRequestDto> otherFacePictureList; | ||
|
||
@Override | ||
public AdvancedPGREQSaveCommand toCommand() { | ||
return AdvancedPGREQSaveCommand.advancedBuilder() | ||
.prompt(this.prompt) | ||
.pictureRatio(this.pictureRatio) | ||
.facePictureKeyList(this.facePictureList.stream().map(CommonPictureKeyUpdateRequestDto::getKey).toList()) | ||
.otherFacePictureKeyList(this.otherFacePictureList.stream().map(CommonPictureKeyUpdateRequestDto::getKey).toList()) | ||
.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