package com.red.circle.common.business.dto.cmd;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.red.circle.framework.core.dto.CommonCommand;
import java.util.Objects;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author pengliang on 2020/11/26
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class FlowCmd extends CommonCommand {

  /**
   * 最后一条记录id.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  private Long lastId;

  public boolean checkCache() {
    return Objects.isNull(lastId);
  }

}
