package cn.axzo.workflow.core.engine.listener.entity;

/**
 * Entity life cycle
 *
 * @author wangli
 * @since 2024-09-06 00:03
 */
public interface EntityEventHandle<T> {

    boolean support(Object entity);

    T convert(Object entity);

    default void onCreate(T entity) {
    }

    default void onInitialized(T entity) {
    }

    default void onUpdated(T entity) {
    }

    default void onDeleted(T entity) {
    }

    default void onSuspended(T entity) {
    }

    default void onActivated(T entity) {
    }

}
