251222_04_ENH : RequestBody에 Valid 적용 및 중괄호 스타일 통일
This commit is contained in:
@@ -5,6 +5,9 @@ import com.kri.contact.server.common.enums.ProjectStatus;
|
||||
import com.kri.contact.server.common.enums.SurveyType;
|
||||
import com.kri.contact.server.persistence.entity.TPrjctEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -16,45 +19,63 @@ import java.time.LocalDateTime;
|
||||
@AllArgsConstructor
|
||||
@Schema(description = "프로젝트 정보")
|
||||
public class ProjectInfoDto {
|
||||
@NotNull
|
||||
@Schema(description = "프로젝트 고유 번호")
|
||||
private Long prjctIdx;
|
||||
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "프로젝트 코드")
|
||||
private String prjctCd;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "프로젝트 진행 상태")
|
||||
private ProjectStatus prjctStatus;
|
||||
|
||||
@Size(max = 128)
|
||||
@NotBlank
|
||||
@Schema(description = "프로젝트 명")
|
||||
private String prjctName;
|
||||
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "인트라넷 프로젝트 코드")
|
||||
private String itrntPrjctCd;
|
||||
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "담당 그룹")
|
||||
private String ownerDept;
|
||||
|
||||
@Size(max = 16)
|
||||
@NotBlank
|
||||
@Schema(description = "담당 실사")
|
||||
private String ownerFw;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "설문지 타입")
|
||||
private SurveyType surveyTy;
|
||||
|
||||
@Size(max = 32)
|
||||
@Schema(description = "내부 설문 시스템 프로젝트 코드")
|
||||
private String surveyPrjctCd;
|
||||
|
||||
@Size(max = 128)
|
||||
@Schema(description = "설문 URL")
|
||||
private String surveyUrl;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "면접원 확인사항 여부")
|
||||
private Boolean ff;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "컨택 시나리오 사용 여부")
|
||||
private Boolean useContactSenario;
|
||||
|
||||
@Schema(description = "컨택 시나리오")
|
||||
private String contactSenario;
|
||||
|
||||
@Size(max = 32)
|
||||
@Schema(description = "등록자", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private String regUser;
|
||||
@@ -63,6 +84,7 @@ public class ProjectInfoDto {
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private LocalDateTime regDt;
|
||||
|
||||
@Size(max = 32)
|
||||
@Schema(description = "수정자", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private String modUser;
|
||||
@@ -71,7 +93,7 @@ public class ProjectInfoDto {
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private LocalDateTime modDt;
|
||||
|
||||
public static ProjectInfoDto from(TPrjctEntity entity){
|
||||
public static ProjectInfoDto from(TPrjctEntity entity) {
|
||||
return ProjectInfoDto.builder()
|
||||
.prjctIdx(entity.getPrjctIdx())
|
||||
.prjctCd(entity.getPrjctCd())
|
||||
|
||||
Reference in New Issue
Block a user