Skip to content

Commit

Permalink
feat #103: add dto
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-yhc committed Oct 5, 2023
1 parent ae70fbb commit 455df5a
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class CreateMissionRequest {

@NotNull
@FutureOrPresent
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy.MM.dd", timezone = "Asia/Seoul")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "Asia/Seoul")
private LocalDate registrationDueDate;

@NotNull
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package swm.hkcc.LGTM.app.modules.mission.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.*;
import lombok.*;
import org.hibernate.validator.constraints.URL;

import java.time.LocalDate;
import java.util.List;

@AllArgsConstructor
@NoArgsConstructor
@Getter
@Builder
@EqualsAndHashCode
public class UpdateMissionRequest {
@NotBlank
@URL
private String missionRepositoryUrl;

@NotBlank
@Size(max = 100)
private String title;

protected List<String> tagList;

@NotBlank
@Size(max = 1000)
private String description;

@Size(max = 1000)
private String recommendTo;

@Size(max = 1000)
private String notRecommendTo;

@FutureOrPresent
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "Asia/Seoul")
private LocalDate registrationDueDate;

@PositiveOrZero
private Integer price;

@Positive
private Integer maxPeopleNumber;

public void trimTitle() {
this.title = this.title.trim();
}
}

0 comments on commit 455df5a

Please sign in to comment.