Apply accessory image
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package com.myoa.engineering.crawl.ppomppu.support.dto;
|
||||
package com.myoa.engineering.crawl.ppomppu.support.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.Instant;
|
||||
@@ -8,31 +8,56 @@ import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* SimpleMessageDTO
|
||||
* @author Shin Woo-jin (woo-jin.shin@linecorp.com)
|
||||
* @since 2021-11-21
|
||||
*
|
||||
*/
|
||||
@Getter
|
||||
@NoArgsConstructor
|
||||
public class BlockMessageDTO implements Serializable {
|
||||
/**
|
||||
* SimpleMessageDTO
|
||||
* @author Shin Woo-jin (woo-jin.shin@linecorp.com)
|
||||
* @since 2021-11-21
|
||||
*
|
||||
*/
|
||||
@Getter
|
||||
@NoArgsConstructor
|
||||
public class BlockMessageDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -6992039884035135523L;
|
||||
private static final long serialVersionUID = -6992039884035135523L;
|
||||
|
||||
private String title;
|
||||
private List<String> blocks;
|
||||
private String url;
|
||||
private Instant publishedAt;
|
||||
private Instant requestedAt;
|
||||
private String title;
|
||||
private List<Block> blocks;
|
||||
private String url;
|
||||
private Instant publishedAt;
|
||||
private Instant requestedAt;
|
||||
|
||||
@Builder
|
||||
public BlockMessageDTO(String title, List<String> blocks, String url, Instant publishedAt,
|
||||
Instant requestedAt) {
|
||||
this.title = title;
|
||||
this.blocks = blocks;
|
||||
this.url = url;
|
||||
this.publishedAt = publishedAt;
|
||||
this.requestedAt = requestedAt;
|
||||
}
|
||||
}
|
||||
@Builder
|
||||
public BlockMessageDTO(String title, List<Block> blocks, String url, Instant publishedAt,
|
||||
Instant requestedAt) {
|
||||
this.title = title;
|
||||
this.blocks = blocks;
|
||||
this.url = url;
|
||||
this.publishedAt = publishedAt;
|
||||
this.requestedAt = requestedAt;
|
||||
}
|
||||
|
||||
@Getter
|
||||
@NoArgsConstructor
|
||||
public static class Block implements Serializable {
|
||||
private static final long serialVersionUID = 3633781631892663709L;
|
||||
|
||||
private String text;
|
||||
private String imageUrl;
|
||||
private String altText;
|
||||
|
||||
public Block(String text, String imageUrl, String altText) {
|
||||
this.text = text;
|
||||
this.imageUrl = imageUrl;
|
||||
this.altText = altText;
|
||||
}
|
||||
}
|
||||
|
||||
public static Block createBlock(String text, String imageUrl) {
|
||||
return new Block(text, imageUrl, "");
|
||||
}
|
||||
|
||||
public static Block createBlock(String text, String imageUrl, String altText) {
|
||||
return new Block(text, imageUrl, altText);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user