package com.usky.iot.controller.web;


import com.usky.common.core.bean.ApiResult;
import com.usky.iot.domain.BaseFacilityDevice;
import com.usky.iot.domain.BaseFacilityType;
import com.usky.iot.service.BaseFacilityDeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 地理设施设备关联表 前端控制器
 * </p>
 *
 * @author han
 * @since 2023-06-07
 */
@RestController
@RequestMapping("/baseFacilityDevice")
public class BaseFacilityDeviceController {
    @Autowired
    private BaseFacilityDeviceService baseFacilityDeviceService;
    /**
     * 新增
     * @param baseFacilityDevice
     * @return
     */
    @PostMapping("/add")
    public ApiResult<Void> add(@RequestBody BaseFacilityDevice baseFacilityDevice){
        baseFacilityDeviceService.add(baseFacilityDevice);
        return ApiResult.success();
    }
    /**
     * 删除
     */
    @DeleteMapping("/{id}")
    public ApiResult<Void> remove(@PathVariable("id") Integer id)
    {
        baseFacilityDeviceService.remove(id);
        return ApiResult.success();
    }
}

