package com.red.circle.other.infra.database.rds.dto;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.red.circle.tool.core.text.StringUtils;
import java.io.Serializable;
import lombok.AccessLevel;
import lombok.Data;
import lombok.experimental.Accessors;
import lombok.experimental.FieldDefaults;

/**
 * @author pengliang on 2020/6/4
 */
@Data
@Accessors(chain = true)
@FieldDefaults(level = AccessLevel.PRIVATE)
public class MessageCopywritingDTO implements Serializable {

  private static final long serialVersionUID = 1L;

  /**
   * 主键标识
   */
  @JsonSerialize(using = ToStringSerializer.class)
  Long id;

  /**
   * 文案类型编号
   */
  @JsonSerialize(using = ToStringSerializer.class)
  Long typeId;

  /**
   * 消息类型
   */
  String msgType;

  /**
   * 模板语言
   */
  String language;

  /**
   * 语言名称
   */
  String languageName;

  /**
   * title
   */
  String title;

  /**
   * content
   */
  String content;


  public boolean contentIsBlank() {
    return StringUtils.isBlank(content);
  }
}
