package cn.ey.biz.module.weaver.api;

import cn.ey.biz.module.weaver.common.Constants;
import cn.ey.biz.module.weaver.common.RSP;
import cn.ey.biz.module.weaver.autoconfigure.FeignConfiguration;
import lombok.Data;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 流程数据：可创建流程类型数量 (对外)
 *
 */
@FeignClient(name= Constants.WEAVER_NAME, url="${weaver.service.url}", configuration = FeignConfiguration.class)
public interface GetCreateWorkflowTypeCountService {

    @RequestMapping(method= RequestMethod.POST, value="/api/workflow/paService/getCreateWorkflowTypeCount",
            consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE,
            produces = MediaType.TEXT_PLAIN_VALUE)
    RSP<CreateWorkflowTypeCountResponse> getCreateWorkflowTypeCount(@RequestBody  CreateWorkflowTypeCountRequest request);

    @Data
    class CreateWorkflowTypeCountRequest{
        CreateWorkflowTypeCountConditions conditions; //非必填	高级搜索条件  - wfTypeName : 流程类型名称。 - wfTypeIds : 流程类型ids(workflowtypeids)。 传入多个流程类型id时通过',' 号分隔
        String userId;                                //非必填	要查询的用户id，不传取当前登录用户	"11"
    }

    @Data
    class CreateWorkflowTypeCountConditions{
        String wfTypeIds;
        String wfTypeName;
    }

    @Data
    class CreateWorkflowTypeCountResponse{

    }

}
