Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
[Feat] DTO Validation 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
NoJaeHyuk committed Jan 27, 2024
1 parent ba976d5 commit 2a20884
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
package fc.be.app.domain.space.dto.request;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import jakarta.validation.constraints.Size;

import java.util.List;

public record DeletedPlacesRequest(
@NotNull
@Size(min = 1)
@NotNull @Size(min = 1) @Valid
List<DeletedPlace> places
) {
public record DeletedPlace(
@Positive
@NotNull
Long journeyId,
List<Long> selectedIds
@Positive
@NotNull
Long journeyId,

@NotNull
@Size(min = 1)
List<Long> selectedIds
) {

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ public record SelectedPlaceRequest(
@Positive
@NotNull
Long journeyId,
/*
place entity id 값
*/
@NotEmpty
List<Integer> placeIds
) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package fc.be.app.domain.space.dto.request;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

import java.util.List;

public record SelectedPlacesRequest(
@NotNull
@Size(min = 1)
@NotNull @Size(min = 1) @Valid
List<SelectedPlaceRequest> places
) {

Expand Down

0 comments on commit 2a20884

Please sign in to comment.