package com.hz.pm.api.common.statemachine.factory;

import com.hz.pm.api.common.statemachine.event.ProjectStatusChangeEvent;
import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum;
import org.springframework.statemachine.StateContext;
import org.springframework.statemachine.guard.Guard;

/**
 * 项目申报状态机guard集合类
 *
 * @author CMM
 * @since 2023/02/07 16:18
 */

public class ProjectDeclareGuardFactory {

    public static class PendingPreQualificationChoiceGuard implements Guard<ProjectStatusEnum, ProjectStatusChangeEvent> {
        @Override
        public boolean evaluate(StateContext<ProjectStatusEnum, ProjectStatusChangeEvent> context) {
            // 判断申报项目是否是市级项目，且申报金额是否大于等于1000万元
            return true;
        }
    }

}
