package cn.stylefeng.team.form.api;

import cn.stylefeng.team.form.api.entity.FormDefinition;
import cn.stylefeng.team.form.api.entity.FormModel;
import cn.stylefeng.team.form.api.pojo.FormDesignVo;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface FormModelServiceApi {

    String getFormModelName(Long formModelId);

    List<FormDesignVo> getFromDesignList(List<Long> formDefinitionIdList);

    List<FormDesignVo> getFromDesignListWithMobileCondition(List<Long> formDefinitionIdList, Boolean mobileFlag);

    Long getFormBusinessId(Long formDefinitionId);

    List<FormModel> getBusinessFormModelList(Long businessId);

    FormDesignVo getFromDesignByFormModelId(Long formModelId);

    Map<Long, Integer> statFormNumber(Set<Long> businessIds);

    FormDefinition createFormModelAndDefinition(Long businessCategoryId,
                                                Long businessId,
                                                String formName,
                                                String formCode);

    void updateFormDefinition(FormDefinition formDefinition);

}
