package com.ruoyi.cron.event;

import com.ruoyi.cron.document.CronTask;
import lombok.Getter;
import org.springframework.context.ApplicationEvent;

public class CronTaskChangeEvent extends ApplicationEvent {

  @Getter
  private ChangeType changeType;

  public CronTaskChangeEvent(CronTask source ,ChangeType changeType) {
    super(source);
    this.changeType = changeType;
  }

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

  public static enum ChangeType{
    ADD,UPDATE,DELETE;
  }
}
