package cn.ibizlab.businesscentral.core.odoo_repair.client;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.businesscentral.core.odoo_repair.domain.Repair_order;
import cn.ibizlab.businesscentral.core.odoo_repair.filter.Repair_orderSearchContext;
import org.springframework.cloud.openfeign.FeignClient;

/**
 * 实体[repair_order] 服务对象接口
 */
@FeignClient(value = "${ibiz.ref.service.odoo-repair:odoo-repair}", contextId = "repair-order", fallback = repair_orderFallback.class)
public interface repair_orderFeignClient {


    @RequestMapping(method = RequestMethod.PUT, value = "/repair_orders/{id}")
    Repair_order update(@PathVariable("id") Long id,@RequestBody Repair_order repair_order);

    @RequestMapping(method = RequestMethod.PUT, value = "/repair_orders/batch")
    Boolean updateBatch(@RequestBody List<Repair_order> repair_orders);



    @RequestMapping(method = RequestMethod.POST, value = "/repair_orders/search")
    Page<Repair_order> search(@RequestBody Repair_orderSearchContext context);




    @RequestMapping(method = RequestMethod.POST, value = "/repair_orders")
    Repair_order create(@RequestBody Repair_order repair_order);

    @RequestMapping(method = RequestMethod.POST, value = "/repair_orders/batch")
    Boolean createBatch(@RequestBody List<Repair_order> repair_orders);


    @RequestMapping(method = RequestMethod.GET, value = "/repair_orders/{id}")
    Repair_order get(@PathVariable("id") Long id);


    @RequestMapping(method = RequestMethod.DELETE, value = "/repair_orders/{id}")
    Boolean remove(@PathVariable("id") Long id);

    @RequestMapping(method = RequestMethod.DELETE, value = "/repair_orders/batch}")
    Boolean removeBatch(@RequestBody Collection<Long> idList);


    @RequestMapping(method = RequestMethod.GET, value = "/repair_orders/select")
    Page<Repair_order> select();


}
