|
1 | 1 | package dmu.dasom.api.domain.applicant.dto; |
2 | 2 |
|
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 4 | +import com.fasterxml.jackson.annotation.JsonSetter; |
| 5 | +import com.fasterxml.jackson.annotation.Nulls; |
3 | 6 | import dmu.dasom.api.domain.applicant.entity.Applicant; |
4 | 7 | import io.swagger.v3.oas.annotations.media.Schema; |
5 | 8 | import jakarta.validation.constraints.*; |
|
9 | 12 | @Schema(name = "ApplicantCreateRequestDto", description = "지원자 생성 요청 DTO") |
10 | 13 | public class ApplicantCreateRequestDto { |
11 | 14 |
|
| 15 | + @NotNull |
| 16 | + @Size(max = 16) |
| 17 | + @Schema(description = "이름", example = "홍길동") |
| 18 | + private String name; |
| 19 | + |
12 | 20 | @NotNull |
13 | 21 | @Pattern(regexp = "^[0-9]{8}$") |
14 | 22 | @Size(min = 8, max = 8) |
@@ -39,13 +47,18 @@ public class ApplicantCreateRequestDto { |
39 | 47 | private String reasonForApply; |
40 | 48 |
|
41 | 49 | @Size(max = 200) |
42 | | - @Schema(description = "활동 희망사항", example = "동아리 활동 참여") |
| 50 | + @Schema(description = "활동 희망사항", example = "동아리 활동 참여", nullable = true) |
43 | 51 | private String activityWish; |
44 | 52 |
|
45 | 53 | @NotNull |
46 | 54 | @Schema(description = "개인정보 처리방침 동의 여부", example = "true") |
47 | 55 | private Boolean isPrivacyPolicyAgreed; |
48 | 56 |
|
| 57 | + @JsonProperty(defaultValue = "false") |
| 58 | + @JsonSetter(nulls = Nulls.SKIP) |
| 59 | + @Schema(description = "지원서 덮어쓰기 확인 여부", example = "false", defaultValue = "false", nullable = true) |
| 60 | + private Boolean isOverwriteConfirmed = false; |
| 61 | + |
49 | 62 | public Applicant toEntity() { |
50 | 63 | return Applicant.builder() |
51 | 64 | .studentNo(this.studentNo) |
|
0 commit comments