package cn.axzo.workflow.core.service;

import cn.axzo.workflow.core.repository.entity.ExtAxProperty;

import java.util.Optional;
import java.util.concurrent.TimeUnit;

/**
 * 引擎服务持久配置信息表操作 Service
 *
 * @author wangli
 * @since 2023/11/18 15:05
 */
public interface ExtAxPropertyService {

    ExtAxProperty add(ExtAxProperty property);

    ExtAxProperty update(ExtAxProperty property);

    Optional<ExtAxProperty> getByName(String name);

    int delete(String name, String value);

    /**
     * 删除指定时间段之前创建的数据
     *
     * @param name
     * @param timeOut
     * @param timeUnit
     * @return
     */
    int deleteByNameWithDuration(String name, Long timeOut, TimeUnit timeUnit);

}
