261022_01_ENH: 예약 발송 취소 구현, record로 전환 가능한 Class Dto record로 전환, KKO 템플릿 등록시 사용 준비도 등록가능 템플릿으로 지정
This commit is contained in:
@@ -3,33 +3,29 @@ package com.kri.notihub.server.dto.template;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class KkoTemplateDetailDto {
|
||||
|
||||
private String templateCode;
|
||||
private String templateName;
|
||||
private String templateContent;
|
||||
private String templatePreviewMessage;
|
||||
private String templateMessageType;
|
||||
private String templateEmphasizeType;
|
||||
private String inspectionStatus;
|
||||
private String status;
|
||||
private Boolean block;
|
||||
private Boolean dormant;
|
||||
private String templateExtra;
|
||||
private String templateImageName;
|
||||
private String templateImageUrl;
|
||||
private String templateTitle;
|
||||
private String templateSubtitle;
|
||||
private String templateHeader;
|
||||
private JsonNode templateItemHighlight;
|
||||
private JsonNode templateItem;
|
||||
private JsonNode templateRepresentLink;
|
||||
private List<JsonNode> buttons;
|
||||
private List<JsonNode> quickReplies;
|
||||
public record KkoTemplateDetailDto(
|
||||
String templateCode,
|
||||
String templateName,
|
||||
String templateContent,
|
||||
String templatePreviewMessage,
|
||||
String templateMessageType,
|
||||
String templateEmphasizeType,
|
||||
String inspectionStatus,
|
||||
String status,
|
||||
Boolean block,
|
||||
Boolean dormant,
|
||||
String templateExtra,
|
||||
String templateImageName,
|
||||
String templateImageUrl,
|
||||
String templateTitle,
|
||||
String templateSubtitle,
|
||||
String templateHeader,
|
||||
JsonNode templateItemHighlight,
|
||||
JsonNode templateItem,
|
||||
JsonNode templateRepresentLink,
|
||||
List<JsonNode> buttons,
|
||||
List<JsonNode> quickReplies
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -3,19 +3,11 @@ package com.kri.notihub.server.dto.template;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class KkoTemplateDetailRequestDto {
|
||||
|
||||
@NotBlank
|
||||
@Size(max = 30)
|
||||
@Pattern(regexp = "[A-Za-z0-9_-]+")
|
||||
private String templateCode;
|
||||
public record KkoTemplateDetailRequestDto(
|
||||
@NotBlank
|
||||
@Size(max = 30)
|
||||
@Pattern(regexp = "[A-Za-z0-9_-]+")
|
||||
String templateCode
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -1,21 +1,12 @@
|
||||
package com.kri.notihub.server.dto.template;
|
||||
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Getter
|
||||
@NoArgsConstructor
|
||||
public class KkoTemplateListRequestDto {
|
||||
|
||||
@Size(min = 2, max = 50)
|
||||
private String keyword;
|
||||
|
||||
public KkoTemplateListRequestDto(String keyword) {
|
||||
setKeyword(keyword);
|
||||
}
|
||||
|
||||
public void setKeyword(String keyword) {
|
||||
this.keyword = keyword == null || keyword.isBlank() ? null : keyword.trim();
|
||||
public record KkoTemplateListRequestDto(
|
||||
@Size(min = 2, max = 50)
|
||||
String keyword
|
||||
) {
|
||||
public KkoTemplateListRequestDto {
|
||||
keyword = keyword == null || keyword.isBlank() ? null : keyword.trim();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,11 @@
|
||||
package com.kri.notihub.server.dto.template;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class KkoTemplateListResponseDto {
|
||||
|
||||
private int totalCount;
|
||||
private int totalPage;
|
||||
private int currentPage;
|
||||
private List<KkoTemplateSummaryDto> list;
|
||||
public record KkoTemplateListResponseDto(
|
||||
int totalCount,
|
||||
int totalPage,
|
||||
int currentPage,
|
||||
List<KkoTemplateSummaryDto> list
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -1,21 +1,13 @@
|
||||
package com.kri.notihub.server.dto.template;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class KkoTemplateSummaryDto {
|
||||
|
||||
private String templateCode;
|
||||
private String templateName;
|
||||
private String serviceStatus;
|
||||
private String createdAt;
|
||||
private String modifiedAt;
|
||||
public record KkoTemplateSummaryDto(
|
||||
String templateCode,
|
||||
String templateName,
|
||||
String serviceStatus,
|
||||
String createdAt,
|
||||
String modifiedAt
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -3,29 +3,20 @@ package com.kri.notihub.server.dto.template;
|
||||
import com.kri.notihub.server.common.enums.TemplatePurpose;
|
||||
import com.kri.notihub.server.persistence.entity.TTmplatEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Schema(description = "템플릿 요약 정보")
|
||||
public class TemplateSummaryDto {
|
||||
public record TemplateSummaryDto(
|
||||
@Schema(description = "템플릿 고유 키")
|
||||
Long tmplatIdx,
|
||||
|
||||
@Schema(description = "템플릿 고유 키")
|
||||
private Long tmplatIdx;
|
||||
|
||||
@Schema(description = "템플릿 명")
|
||||
private String tmplatNm;
|
||||
|
||||
@Schema(description = "템플릿 목적")
|
||||
private TemplatePurpose tmplatPurpose;
|
||||
@Schema(description = "템플릿 명")
|
||||
String tmplatNm,
|
||||
|
||||
@Schema(description = "템플릿 목적")
|
||||
TemplatePurpose tmplatPurpose
|
||||
) {
|
||||
public static TemplateSummaryDto from(TTmplatEntity entity) {
|
||||
return TemplateSummaryDto.builder()
|
||||
.tmplatIdx(entity.getTmplatIdx())
|
||||
|
||||
Reference in New Issue
Block a user