package com.ruoyi.cron.event;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import org.springframework.context.ApplicationEvent;

import java.time.Clock;

/**
 * 定时任务日志事件
 */
@Getter
public class CronTaskLogEvent extends ApplicationEvent {

  private Long logId;
  private String taskId;
  private Integer groupId;
  private String ex;


  public CronTaskLogEvent(Long logId,String taskId, Integer groupId, String ex) {
    super(groupId);
    this.logId = logId;
    this.taskId = taskId;
    this.groupId = groupId;
    this.ex = ex;
  }

  @Override
  @JsonIgnore
  public Integer getSource() {
    return (Integer) super.getSource();
  }
}
