122 lines
3.5 KiB
Java
122 lines
3.5 KiB
Java
package com.kri.contact.server.dto;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
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 java.time.LocalDateTime;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.Builder;
|
|
import lombok.Getter;
|
|
import lombok.NoArgsConstructor;
|
|
import lombok.Setter;
|
|
|
|
@Getter
|
|
@Setter
|
|
@Builder
|
|
@NoArgsConstructor
|
|
@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;
|
|
|
|
@Schema(description = "등록일시", accessMode = Schema.AccessMode.READ_ONLY)
|
|
@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;
|
|
|
|
@Schema(description = "수정일시", accessMode = Schema.AccessMode.READ_ONLY)
|
|
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
|
private LocalDateTime modDt;
|
|
|
|
public static ProjectInfoDto from(TPrjctEntity entity) {
|
|
return ProjectInfoDto.builder()
|
|
.prjctIdx(entity.getPrjctIdx())
|
|
.prjctCd(entity.getPrjctCd())
|
|
.prjctStatus(ProjectStatus.fromCode(entity.getPrjctStatus()))
|
|
.prjctName(entity.getPrjctNm())
|
|
.itrntPrjctCd(entity.getItrntPrjctCd())
|
|
.ownerDept(entity.getOwnerDept())
|
|
.ownerFw(entity.getOwnerFw())
|
|
.surveyTy(SurveyType.fromCode(entity.getSurveyTy()))
|
|
.surveyPrjctCd(entity.getSurveyPrjctCd())
|
|
.surveyUrl(entity.getSurveyUrl())
|
|
.ff(entity.getFf())
|
|
.useContactSenario(entity.getUseContactSenario())
|
|
.contactSenario(entity.getContactSenario())
|
|
.regUser(entity.getRegUser())
|
|
.regDt(entity.getRegDt())
|
|
.modUser(entity.getModUser())
|
|
.modDt(entity.getModDt())
|
|
.build();
|
|
}
|
|
}
|